Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Fix a memory leak in the gif_clone_create() error path.
details: https://anonhg.NetBSD.org/src/rev/ecb555b2afff
branches: trunk
changeset: 494324:ecb555b2afff
user: thorpej <thorpej%NetBSD.org@localhost>
date: Wed Jul 05 16:54:19 2000 +0000
description:
Fix a memory leak in the gif_clone_create() error path.
diffstat:
sys/net/if_gif.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (25 lines):
diff -r 473c514a5ed6 -r ecb555b2afff sys/net/if_gif.c
--- a/sys/net/if_gif.c Wed Jul 05 16:29:25 2000 +0000
+++ b/sys/net/if_gif.c Wed Jul 05 16:54:19 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gif.c,v 1.12 2000/07/02 00:21:42 thorpej Exp $ */
+/* $NetBSD: if_gif.c,v 1.13 2000/07/05 16:54:19 thorpej Exp $ */
/* $KAME: if_gif.c,v 1.28 2000/06/20 12:30:03 jinmei Exp $ */
/*
@@ -160,6 +160,7 @@
gif_encapcheck, &in_gif_protosw, sc);
if (sc->encap_cookie4 == NULL) {
printf("%s: unable to attach encap4\n", if_name(&sc->gif_if));
+ free(sc, M_DEVBUF);
return (EIO); /* XXX */
}
#endif
@@ -172,6 +173,7 @@
sc->encap_cookie4 = NULL;
}
printf("%s: unable to attach encap6\n", if_name(&sc->gif_if));
+ free(sc, M_DEVBUF);
return (EIO); /* XXX */
}
#endif
Home |
Main Index |
Thread Index |
Old Index