Fixed memory leak

This commit is contained in:
bwilliams committed 2020-10-09 13:30:16 +01:00
1 parent 529dc29850
commit 2bf9b2bf8d
1 file changed
+1 -5
+1 -5
View File
@@ -271,11 +271,6 @@ int modbMetadataListByGroupId(stored_conn *sconn, modb_ref *modb, unsigned int g
return 0;
}
*metadata_list = (struct metadata_t **)malloc(sizeof(struct metadata_t *) * n_ids);
if (*metadata_list == 0) {
return -1;
}
wb = whereIn(0, 0, "mdo_id", TYPE_ID, 0);
for (idx = 0; idx < n_ids; idx++) {
setWhereValue(wb, TYPE_ID, 1, *(ids + idx));
@@ -285,6 +280,7 @@ int modbMetadataListByGroupId(stored_conn *sconn, modb_ref *modb, unsigned int g
freeWhereBuilder(&wb);
}
free(ids);
return res;
}