forked from osmocom/wireshark
As pointed by Evan: don't leak memory when the string pointer is NULL.
svn path=/trunk/; revision=52908
This commit is contained in:
parent
18b9db29b9
commit
9259176f87
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue