Module: kamailio
Branch: master
Commit: c1ea48cfe38e6c52c50e6f1d698254a789e988f1
URL:
https://github.com/kamailio/kamailio/commit/c1ea48cfe38e6c52c50e6f1d698254a…
Author: Dragos Oancea <dragos.oancea(a)athonet.com>
Committer: Dragos Oancea <dragos.oancea(a)athonet.com>
Date: 2016-08-22T09:58:48+02:00
core: fix double free on clearing lump
---
Modified: data_lump_rpl.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c1ea48cfe38e6c52c50e6f1d698254a…
Patch:
https://github.com/kamailio/kamailio/commit/c1ea48cfe38e6c52c50e6f1d698254a…
---
diff --git a/data_lump_rpl.c b/data_lump_rpl.c
index 6ce77f8..6b8ba8d 100644
--- a/data_lump_rpl.c
+++ b/data_lump_rpl.c
@@ -102,9 +102,12 @@ void free_lump_rpl(struct lump_rpl* lump)
{
if (lump) {
if (!((lump->flags)&LUMP_RPL_NOFREE) &&
((lump->flags)&LUMP_RPL_NODUP)
- && lump->text.s)
+ && lump->text.s) {
pkg_free(lump->text.s);
+ lump->text.s = 0;
+ }
pkg_free(lump);
+ lump = 0;
}
}