Skip to content

Commit

Permalink
Fix leaks in sdb -G
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed May 29, 2023
1 parent d8888c4 commit 49091bc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,8 @@ static int sdb_dump(MainOptions *mo) {
if (!mo->textmode && mo->format == cgen && ls_length (l) > SDB_MAX_GPERF_KEYS) {
ls_free (l);
eprintf ("Error: gperf doesn't work with datasets with more than 15.000 keys.\n");
sdb_gh_free (name);
sdb_gh_free (cname);
return -1;
ret = -1;
goto fail;
}
SdbKv *kv;
SdbListIter *it;
Expand Down Expand Up @@ -538,9 +537,10 @@ static int sdb_dump(MainOptions *mo) {
break;
}
}
// sdb_free (db);
fail:
sdb_gh_free (cname);
sdb_gh_free (name);
sdb_free (db);
return ret;
}

Expand Down

0 comments on commit 49091bc

Please sign in to comment.