Add a comment about not needing to g_free() the value returned from g_locale_to_utf8().
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 21 Dec 2010 21:01:01 +0000 (21:01 +0000)
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 21 Dec 2010 21:01:01 +0000 (21:01 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@35240 f5534014-38df-0310-8fa8-9805f1628bb7

epan/to_str.c

index b119c1117a46eeb14f25e4c707fd5e4c063a08df..4ba8d42b706400b6b99a52492a4fe68d71bbabf2 100644 (file)
@@ -504,6 +504,9 @@ static const gchar *get_zonename(struct tm *tmp) {
        {
                static char *ws_tzname[2] = {NULL, NULL};
 
+               /* The g_malloc'd value returned from g_locale_to_utf8() is   */
+               /*  cached for all further use so there's no need to ever     */
+               /*  g_free() that value.                                      */
                if (ws_tzname[tmp->tm_isdst] == NULL) {
                        ws_tzname[tmp->tm_isdst] = g_locale_to_utf8(_tzname[tmp->tm_isdst], -1, NULL, NULL, NULL);
                        if (ws_tzname[tmp->tm_isdst] == NULL) {