git.samba.org
/
metze
/
wireshark
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18b9db2
)
As pointed by Evan: don't leak memory when the string pointer is NULL.
author
Jeff Morriss
<jeff.morriss.ws@gmail.com>
Sun, 27 Oct 2013 22:40:55 +0000
(22:40 -0000)
committer
Jeff Morriss
<jeff.morriss.ws@gmail.com>
Sun, 27 Oct 2013 22:40:55 +0000
(22:40 -0000)
svn path=/trunk/; revision=52908
epan/proto.c
patch
|
blob
|
history
diff --git
a/epan/proto.c
b/epan/proto.c
index b7b0d40bcd356453b73b6d1e0f462978eff10883..f64378a82c18eeea38758ac7f135eb38cafbe67b 100644
(file)
--- a/
epan/proto.c
+++ b/
epan/proto.c
@@
-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);
}
}