summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/knocker/files/knocker-0.7.1-free.patch')
-rw-r--r--net-analyzer/knocker/files/knocker-0.7.1-free.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/net-analyzer/knocker/files/knocker-0.7.1-free.patch b/net-analyzer/knocker/files/knocker-0.7.1-free.patch
new file mode 100644
index 000000000000..5381d2fd83e3
--- /dev/null
+++ b/net-analyzer/knocker/files/knocker-0.7.1-free.patch
@@ -0,0 +1,30 @@
+--- a/src/knocker_conf.c
++++ b/src/knocker_conf.c
+@@ -223,6 +223,8 @@
+ {
+ char *tmpp = malloc (strlen (line));
+ char *p = malloc (strlen (line));
++ char *tmpp_orig = tmpp;
++ char *p_orig = p;
+
+ /* Check if the option is present in the line */
+ tmpp = strstr (line, opt);
+@@ -234,7 +236,7 @@
+
+ if (!_isblank (*tmpp) || *tmpp != KNOCKER_OPTION_TOKEN)
+ {
+- free (tmpp);
++ free (tmpp_orig);
+ return 0;
+ }
+
+@@ -247,8 +249,7 @@
+
+ strcpy (value, p);
+
+- /* free(p); this cause knocker to segfault */
+- /* well I have to know why... */
++ free(p_orig);
+
+ return 1;
+ }