diff options
Diffstat (limited to 'lib/libkvm/kvm.c')
-rw-r--r-- | lib/libkvm/kvm.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/libkvm/kvm.c b/lib/libkvm/kvm.c index ee97c433b16..a261ce4ff82 100644 --- a/lib/libkvm/kvm.c +++ b/lib/libkvm/kvm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm.c,v 1.55 2015/05/11 00:42:54 guenther Exp $ */ +/* $OpenBSD: kvm.c,v 1.56 2015/09/04 02:55:09 dlg Exp $ */ /* $NetBSD: kvm.c,v 1.43 1996/05/05 04:31:59 gwr Exp $ */ /*- @@ -163,6 +163,14 @@ _kvm_malloc(kvm_t *kd, size_t n) return (p); } +void * +_kvm_realloc(kvm_t *kd, void *p, size_t n) +{ + if ((p = realloc(p, n)) == NULL) + _kvm_err(kd, kd->program, "%s", strerror(errno)); + return (p); +} + static kvm_t * _kvm_open(kvm_t *kd, const char *uf, const char *mf, const char *sf, int flag, char *errout) |