git.samba.org
/
obnox
/
wireshark
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d15093b
)
Fix segmentation fault when NULL err_msg pointer passed to capture_interface_list...
author
jake
<jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 11 Jun 2007 06:40:56 +0000
(06:40 +0000)
committer
jake
<jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 11 Jun 2007 06:40:56 +0000
(06:40 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22073
f5534014
-38df-0310-8fa8-
9805f1628bb7
capture.c
patch
|
blob
|
history
diff --git
a/capture.c
b/capture.c
index f3cdee6e16be4033bb6722518191da8a6516ffa0..c0e918a70a6739b57465756bacd0caa68c2f2f0e 100644
(file)
--- a/
capture.c
+++ b/
capture.c
@@
-602,12
+602,16
@@
capture_interface_list(int *err, char **err_str)
/* Try to get our interface list */
*err = sync_interface_list_open(&msg);
- if(*err != 0) {
+ if
(*err != 0) {
g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_MESSAGE, "Capture Interface List failed!");
- if (*err_str)
- *err_str = msg;
- else
+ if (err_str) {
+ if (*err_str)
+ *err_str = msg;
+ else
+ g_free(msg);
+ } else {
g_free(msg);
+ }
return NULL;
}