Error: File Leak
Leaked File f
at line 272 of src/common_device_name.c in function 'populate_vendor'.
f initialized at line 204 with fopen("/usr/share/hwdata/pci.ids", "r").
[ This bug was found by the Parfait 0.5.0 bug checking tool.
For more information see http://labs.oracle.com/projects/parfait/ ]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
d = realloc( vend->devices, (vend->num_devices + 1)
* sizeof( struct pci_device_leaf ) );
if ( d == NULL ) {
- return;
+ goto cleanup;
}
last_dev = & d[ vend->num_devices - 1 ];
}
}
+ cleanup:
pci_id_file_close( f );
}