Skip to content

Commit

Permalink
Merge branch 'dev' into rm--Q
Browse files Browse the repository at this point in the history
  • Loading branch information
pelijah authored May 5, 2024
2 parents 324dce5 + 464f5bb commit a026843
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions librz/bin/p/bin_luac.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,22 @@ static RzPVector /*<RzBinString *>*/ *strings(RzBinFile *bf) {
return NULL;
}

RzPVector *pvec = rz_pvector_new((RzPVectorFree)rz_bin_string_free);
if (!pvec || !rz_pvector_reserve(pvec, rz_list_length(bin_info_obj->string_list))) {
rz_pvector_free(pvec);
return NULL;
}
RzListIter *iter;
RzBinString *bstr;
RzPVector *pvec = rz_pvector_new((RzPVectorFree)bin_info_obj->string_list->free);
rz_list_foreach (bin_info_obj->string_list, iter, bstr) {
rz_pvector_push(pvec, bstr);
}
if (bstr) {
rz_pvector_push(pvec, bstr);
}
}
RzListFree free_cb = bin_info_obj->string_list->free;
bin_info_obj->string_list->free = NULL;
rz_list_purge(bin_info_obj->string_list);
bin_info_obj->string_list->free = free_cb;
return pvec;
}

Expand Down

0 comments on commit a026843

Please sign in to comment.