From df533f10c0c3212d0e4d2610d4b7b67c84e1a3b1 Mon Sep 17 00:00:00 2001 From: Cynthia Rempel Date: Sun, 25 Aug 2013 16:49:21 -0700 Subject: Stop a resource leak Stops a resource leak in the event that the system cannot malloc --- cpukit/libmisc/untar/untar.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cpukit/libmisc/untar/untar.c b/cpukit/libmisc/untar/untar.c index 5cebc2d9ed..9ed00e92a0 100644 --- a/cpukit/libmisc/untar/untar.c +++ b/cpukit/libmisc/untar/untar.c @@ -281,6 +281,7 @@ Untar_FromFile( bufr = (char *)malloc(512); if (bufr == NULL) { + close(fd); return(UNTAR_FAIL); } -- cgit v1.2.3