Patch: meta_data.c
"Nikos Balkanas" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <70AA2332EBB043ABB16794D169CA8794@tardis> |
Hi, This patch fixes a memory leak each time an smpp_pdu is processed. Reported first by valgrind, source code 1 liner, very obvious. However, valgrind still reports it as leak after patch. BR, Nikos
meta_data.diff
(application/octet-stream, 693 B)
Index: gw/meta_data.c
===================================================================
RCS file: /home/cvs/gateway/gw/meta_data.c,v
retrieving revision 1.4
diff -a -u -r1.4 meta_data.c
--- gw/meta_data.c 4 May 2009 12:04:07 -0000 1.4
+++ gw/meta_data.c 3 Dec 2009 07:41:22 -0000
@@ -291,7 +291,7 @@
while((key = gwlist_extract_first(keys)) != NULL) {
dict_put_once((Dict*)dict, key, octstr_duplicate(dict_get(curr->values, key)));
}
- gwlist_destroy(keys, NULL);
+ gwlist_destroy(keys, octstr_destroy_item);
}
dict_destroy(curr->values);
curr->values = (Dict*)dict;