diff options
Diffstat (limited to 'meta-oe/recipes-support/libtar/files/0006-fix-memleak-on-tar_open-failure.patch')
-rw-r--r-- | meta-oe/recipes-support/libtar/files/0006-fix-memleak-on-tar_open-failure.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libtar/files/0006-fix-memleak-on-tar_open-failure.patch b/meta-oe/recipes-support/libtar/files/0006-fix-memleak-on-tar_open-failure.patch new file mode 100644 index 0000000000..90809ad846 --- /dev/null +++ b/meta-oe/recipes-support/libtar/files/0006-fix-memleak-on-tar_open-failure.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From f6c5cba59444ecda9bbc22b8e8e57fd1015a688d Mon Sep 17 00:00:00 2001 | ||
2 | From: Huzaifa Sidhpurwala <huzaifas@fedoraproject.org> | ||
3 | Date: Tue, 15 Oct 2013 20:02:58 -0400 | ||
4 | Subject: [PATCH] fix memleak on tar_open() failure | ||
5 | |||
6 | Authored by Huzaifa Sidhpurwala <huzaifas@fedoraproject.org>. | ||
7 | |||
8 | Upstream-Status: Backport [https://repo.or.cz/libtar.git/commit/36629a41208375f5105427e98078127551692028] | ||
9 | |||
10 | Signed-off-by: Katariina Lounento <katariina.lounento@vaisala.com> | ||
11 | --- | ||
12 | lib/handle.c | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/lib/handle.c b/lib/handle.c | ||
16 | index 33a262c..002d23c 100644 | ||
17 | --- a/lib/handle.c | ||
18 | +++ b/lib/handle.c | ||
19 | @@ -82,6 +82,7 @@ tar_open(TAR **t, const char *pathname, tartype_t *type, | ||
20 | (*t)->fd = (*((*t)->type->openfunc))(pathname, oflags, mode); | ||
21 | if ((*t)->fd == -1) | ||
22 | { | ||
23 | + libtar_hash_free((*t)->h, NULL); | ||
24 | free(*t); | ||
25 | return -1; | ||
26 | } | ||