Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/bundle: fix freeing of GPtrArray in casync_make_arch()
This fixes both a memory leakage and a prevented double-free. The 'iargs' pointer array is allocated using an auto pointer and a free function. This works quite well until manually calling g_ptr_array_free(). This correctly frees the pointer array structure and leaves the memory pointed at untouched. BUT, since 'iargs' itself is not NULL after this, the auto pointer cleanup will later attempt to free the GPtrArray a second time and causes an assertion error: | g_atomic_ref_count_dec: assertion 'old_value > 0' failed This can be fixed by simply accessing the pointer array data (->pdata) without manual freeing. Fixes rauc#1461 Reported-by: Matteo Carnelos <[email protected]> Signed-off-by: Enrico Joerns <[email protected]>
- Loading branch information