Module: kamailio
Branch: master
Commit: 76de00a483c7ed0dbfeadde2685d2800bf291cef
URL:
https://github.com/kamailio/kamailio/commit/76de00a483c7ed0dbfeadde2685d280…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-08-24T10:36:04+02:00
core: mem - check if fragmet exists before setting function field
---
Modified: src/core/mem/q_malloc.c
---
Diff:
https://github.com/kamailio/kamailio/commit/76de00a483c7ed0dbfeadde2685d280…
Patch:
https://github.com/kamailio/kamailio/commit/76de00a483c7ed0dbfeadde2685d280…
---
diff --git a/src/core/mem/q_malloc.c b/src/core/mem/q_malloc.c
index e1b48ecd63f..1605cba5990 100644
--- a/src/core/mem/q_malloc.c
+++ b/src/core/mem/q_malloc.c
@@ -807,7 +807,8 @@ void qm_setfunc(void *qmp, void *p, char *func)
}
f = (struct qm_frag *)((char *)p - sizeof(struct qm_frag));
- f->func = func;
+ if(f)
+ f->func = func;
#endif
}