HTTP module memory leaks
[asterisk/asterisk.git] / main / http.c
index bb6ae61..d08b17f 100644 (file)
@@ -389,6 +389,12 @@ void ast_http_uri_unlink_all_with_key(const char *key)
                if (!strcmp(urih->key, key)) {
                        AST_RWLIST_REMOVE_CURRENT(entry);
                }
+               if (urih->dmallocd) {
+                       ast_free(urih->data);
+               }
+               if (urih->mallocd) {
+                       ast_free(urih);
+               }
        }
        AST_RWLIST_TRAVERSE_SAFE_END
        AST_RWLIST_UNLOCK(&uris);