VirtualBox

Changeset 103130 in vbox


Ignore:
Timestamp:
Jan 31, 2024 8:37:41 AM (12 months ago)
Author:
vboxsync
Message:

xpcom/xpidl_idl.c: Fix possible (harmless) memory leaks, bugref:3409

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_idl.c

    r99767 r103130  
    216216        just_read = fread(buffer + offset, 1, buffer_size - offset, inputfile);
    217217        if (ferror(inputfile))
     218        {
     219            free(buffer);
    218220            return NULL;
     221        }
    219222
    220223        if (just_read < buffer_size - offset || just_read == 0) {
     
    473476}
    474477
     478#ifndef VBOX
    475479/* set this with a debugger to see exactly what libIDL sees */
    476480static FILE *tracefile = NULL;
     481#endif
    477482
    478483static int
     
    611616        data->point = start + copy;
    612617
     618#ifndef VBOX
    613619        if (tracefile)
    614620            fwrite(cb_data->fill.buffer, copy, 1, tracefile);
     621#endif
    615622
    616623        return copy;
     
    717724            g_warning("Parse of %s failed", filename);
    718725        }
     726        free(outname);
    719727        return 0;
    720728    }
     
    762770        if (!state.file) {
    763771            perror("error opening output file");
     772            free(outname);
    764773            return 0;
    765774        }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette