diff options
author | Pascal Terjan <pterjan@mandriva.org> | 2009-06-25 14:42:23 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mandriva.org> | 2009-06-25 14:42:23 +0000 |
commit | 5d36c9abed2306e48e6efdd0ebdca8d45e0f780e (patch) | |
tree | fd5cfecbe1ba4cbfe09f9e5b3fa03082381d1b24 | |
parent | c2aae37ae44a0058867d384791f3d0af85f7df1c (diff) | |
download | ldetect-5d36c9abed2306e48e6efdd0ebdca8d45e0f780e.tar ldetect-5d36c9abed2306e48e6efdd0ebdca8d45e0f780e.tar.gz ldetect-5d36c9abed2306e48e6efdd0ebdca8d45e0f780e.tar.bz2 ldetect-5d36c9abed2306e48e6efdd0ebdca8d45e0f780e.tar.xz ldetect-5d36c9abed2306e48e6efdd0ebdca8d45e0f780e.zip |
Do not lose pointer when realloc decides to move it
-rw-r--r-- | pci.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -97,7 +97,8 @@ extern struct pciusb_entries pci_probe(void) { close(devf); } - realloc(r.entries, sizeof(struct pciusb_entry) * r.nb); + r.entries = realloc(r.entries, sizeof(struct pciusb_entry) * r.nb); + pci_cleanup(pacc); if (pciusb_find_modules(&r, "pcitable", DO_NOT_LOAD, 1)) |