As pointed by Evan: don't leak memory when the string pointer is NULL.

svn path=/trunk/; revision=52908
This commit is contained in:
Jeff Morriss 2013-10-27 22:40:55 +00:00
parent 18b9db29b9
commit 9259176f87
1 changed files with 1 additions and 1 deletions

View File

@ -2595,7 +2595,7 @@ proto_tree_set_string(field_info *fi, const char* value, gint length)
if (value) {
fvalue_set(&fi->value, (gpointer) g_strndup(value, length), TRUE);
} else {
fvalue_set(&fi->value, (gpointer) g_strdup("[ Null ]"), FALSE);
fvalue_set(&fi->value, (gpointer) "[ Null ]", FALSE);
}
}