diff options
author | Cynthia Rempel <cynthia@rtems.org> | 2013-08-25 16:49:21 -0700 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-08-26 09:18:37 +0200 |
commit | df533f10c0c3212d0e4d2610d4b7b67c84e1a3b1 (patch) | |
tree | 52907a711558abd80ab53c95a219ad55c59e4baf /cpukit/libmisc/untar/untar.c | |
parent | smp: Fix warnings (diff) | |
download | rtems-df533f10c0c3212d0e4d2610d4b7b67c84e1a3b1.tar.bz2 |
Stop a resource leak
Stops a resource leak in the event that the system cannot malloc
Diffstat (limited to '')
-rw-r--r-- | cpukit/libmisc/untar/untar.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); } |