librz/type: fix memory leak in listing formats (#6448)
Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
This commit is contained in:
parent
2de65410ef
commit
e2a168905b
1 changed files with 1 additions and 1 deletions
|
|
@ -690,7 +690,7 @@ static bool format_collect_cb(void *user, const char *k, const char *v) {
|
|||
*/
|
||||
RZ_API RZ_OWN RzList /*<RzTypeFormat *>*/ *rz_type_db_format_all(RzTypeDB *typedb) {
|
||||
rz_return_val_if_fail(typedb, NULL);
|
||||
RzList *formats = rz_list_new();
|
||||
RzList *formats = rz_list_newf(free);
|
||||
ht_ss_foreach(typedb->formats, format_collect_cb, formats);
|
||||
return formats;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue