Module Name: src
Committed By: snj
Date: Thu Apr 23 02:07:04 UTC 2009
Modified Files:
src/usr.sbin/rtsold [netbsd-3]: if.c
Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #2008):
usr.sbin/rtsold/if.c: revision 1.15
prevent a potential resource leak, not found by coverity (perhaps masked by
previous)
To generate a diff of this commit:
cvs rdiff -u -r1.13.6.1 -r1.13.6.2 src/usr.sbin/rtsold/if.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/rtsold/if.c
diff -u src/usr.sbin/rtsold/if.c:1.13.6.1 src/usr.sbin/rtsold/if.c:1.13.6.2
--- src/usr.sbin/rtsold/if.c:1.13.6.1 Thu Apr 23 02:06:15 2009
+++ src/usr.sbin/rtsold/if.c Thu Apr 23 02:07:04 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.13.6.1 2009/04/23 02:06:15 snj Exp $ */
+/* $NetBSD: if.c,v 1.13.6.2 2009/04/23 02:07:04 snj Exp $ */
/* $KAME: if.c,v 1.18 2002/05/31 10:10:03 itojun Exp $ */
/*
@@ -275,8 +275,10 @@
return(NULL);
}
- if ((ret_sdl = malloc(sdl->sdl_len)) == NULL)
+ if ((ret_sdl = malloc(sdl->sdl_len)) == NULL) {
+ free(buf);
return(NULL);
+ }
memcpy((caddr_t)ret_sdl, (caddr_t)sdl, sdl->sdl_len);
free(buf);