diff options
author | 1998-08-14 21:39:18 +0000 | |
---|---|---|
committer | 1998-08-14 21:39:18 +0000 | |
commit | e512315e955209fedb2d53461c3973f04fc1dd55 (patch) | |
tree | b9010203c21d01e17b517ff226492586563669b8 /lib/libc/time/ialloc.c | |
parent | realloc repair (diff) | |
download | wireguard-openbsd-e512315e955209fedb2d53461c3973f04fc1dd55.tar.xz wireguard-openbsd-e512315e955209fedb2d53461c3973f04fc1dd55.zip |
realloc repair
Diffstat (limited to 'lib/libc/time/ialloc.c')
-rw-r--r-- | lib/libc/time/ialloc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/time/ialloc.c b/lib/libc/time/ialloc.c index 78ce8e6b54f..39bb4db7dce 100644 --- a/lib/libc/time/ialloc.c +++ b/lib/libc/time/ialloc.c @@ -1,6 +1,6 @@ #if defined(LIBC_SCCS) && !defined(lint) && !defined(NOID) static char elsieid[] = "@(#)ialloc.c 8.29"; -static char rcsid[] = "$OpenBSD: ialloc.c,v 1.4 1998/01/18 23:24:52 millert Exp $"; +static char rcsid[] = "$OpenBSD: ialloc.c,v 1.5 1998/08/14 21:39:43 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /*LINTLIBRARY*/ @@ -53,6 +53,8 @@ const char * const new; if ((result = irealloc(old, oldsize + newsize + 1)) != NULL) if (new != NULL) (void) strcpy(result + oldsize, new); + else + free(old); return result; } |