diff options
Diffstat (limited to 'lib/libkvm/kvm_proc.c')
-rw-r--r-- | lib/libkvm/kvm_proc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c index 75bace45..4bcc2e5 100644 --- a/lib/libkvm/kvm_proc.c +++ b/lib/libkvm/kvm_proc.c @@ -370,8 +370,10 @@ _kvm_realloc(kd, p, n) { void *np = (void *)realloc(p, n); - if (np == 0) + if (np == 0) { + free(p); _kvm_err(kd, kd->program, "out of memory"); + } return (np); } |