File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -212,6 +212,12 @@ int dwarf_discr_list(Dwarf_Debug dbg,
212
212
ary = (struct Dwarf_Dsc_Entry_s * )calloc (arraycount ,
213
213
sizeof (struct Dwarf_Dsc_Entry_s ));
214
214
if (!ary ) {
215
+ /* Coverity scan CID 531838. Mem leak.
216
+ Free the block h points to here too. */
217
+ free (h -> dsh_block );
218
+ h -> dsh_block = 0 ;
219
+ h -> dsh_block_len = 0 ;
220
+ dscblockp = 0 ;
215
221
dwarf_dealloc (dbg ,h ,DW_DLA_DSC_HEAD );
216
222
_dwarf_error (dbg , error , DW_DLE_ALLOC_FAIL );
217
223
return DW_DLV_ERROR ;
@@ -220,7 +226,6 @@ int dwarf_discr_list(Dwarf_Debug dbg,
220
226
h -> dsh_array = ary ;
221
227
h -> dsh_set_unsigned = 0 ;
222
228
h -> dsh_set_signed = 0 ;
223
-
224
229
* dsc_head_out = h ;
225
230
* dsc_array_length_out = arraycount ;
226
231
return DW_DLV_OK ;
You can’t perform that action at this time.
0 commit comments