orderedmap: fix memory leak when using orderedmap_remove()

closes #351
This commit is contained in:
rofl0r committed 2021-03-14 16:06:10 +00:00
1 parent 38934921c4
commit c4231e58bf
3 files changed
+17 -2

No files matched your search

+2
View File
@@ -14,6 +14,8 @@ typedef union htab_value {
struct htab * htab_create(size_t);
void htab_destroy(struct htab *);
htab_value* htab_find(struct htab *, const char* key);
/* same as htab_find, but can retrieve the saved key (for freeing) */
htab_value* htab_find2(struct htab *htab, const char* key, char **saved_key);
int htab_insert(struct htab *, char*, htab_value);
int htab_delete(struct htab *htab, const char* key);
size_t htab_next(struct htab *, size_t iterator, char** key, htab_value **v);