diff options
| author | Glauber Costa <glommer@redhat.com> | 2009-09-17 16:53:39 -0400 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-05 09:32:44 -0500 |
| commit | a9796703447fc5c5691b749915f0f627f47f05a9 (patch) | |
| tree | 5a081b62ed2015fa99669feffa01ea4dc8bed3b6 /qemu-timer.h | |
| parent | e5bc201df7e060bc4c2912258a77c53f8901356c (diff) | |
| download | focaccia-qemu-a9796703447fc5c5691b749915f0f627f47f05a9.tar.gz focaccia-qemu-a9796703447fc5c5691b749915f0f627f47f05a9.zip | |
Correctly free nd structure
When we "free" a NICInfo structure, we can leak pointers, since we don't do much more than setting used = 0. We free() the model parameter, but we don't set it to NULL. This means that a new user of this structure will see garbage in there. It was not noticed before because reusing a NICInfo is not that common, but it can be, for users of device pci hotplug. A user hit it, described at https://bugzilla.redhat.com/show_bug.cgi?id=524022 This patch memset's the whole structure, guaranteeing that anyone reusing it will see a fresh NICinfo. Also, we free some other strings that are currently leaking. This codebase is quite old, so this patch should feed all stable trees. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-timer.h')
0 files changed, 0 insertions, 0 deletions