Skip to content
Snippets Groups Projects
Commit e960f0da authored by Joshua Colp's avatar Joshua Colp
Browse files

Fix a bug in stringfields where it did not actually free the pools of memory.

(closes issue #15074)
Reported by: pj


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent f22962a0
No related branches found
No related tags found
No related merge requests found
......@@ -1560,7 +1560,11 @@ int __ast_string_field_init(struct ast_string_field_mgr *mgr, struct ast_string_
}
if (needed < 0) { /* reset all pools */
/* nothing to do */
if (*pool_head == NULL) {
ast_log(LOG_WARNING, "trying to reset empty pool\n");
return -1;
}
cur = *pool_head;
} else if (mgr->embedded_pool) { /* preserve the embedded pool */
preserve = mgr->embedded_pool;
cur = *pool_head;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment