mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-05 12:38:09 -07:00
Thanks-to: Michał Łyszczek <michal.lyszczek@gmail.com> Closes: https://bugs.gentoo.org/613438 Package-Manager: Portage-2.3.24, Repoman-2.3.6
25 lines
630 B
Diff
25 lines
630 B
Diff
From 36629a41208375f5105427e98078127551692028 Mon Sep 17 00:00:00 2001
|
|
From: Huzaifa Sidhpurwala <huzaifas@fedoraproject.org>
|
|
Date: Tue, 15 Oct 2013 20:02:58 -0400
|
|
Subject: [PATCH] fix memleak on tar_open() failure
|
|
|
|
---
|
|
lib/handle.c | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/lib/handle.c b/lib/handle.c
|
|
index 33a262c..002d23c 100644
|
|
--- a/lib/handle.c
|
|
+++ b/lib/handle.c
|
|
@@ -82,6 +82,7 @@ tar_open(TAR **t, const char *pathname, tartype_t *type,
|
|
(*t)->fd = (*((*t)->type->openfunc))(pathname, oflags, mode);
|
|
if ((*t)->fd == -1)
|
|
{
|
|
+ libtar_hash_free((*t)->h, NULL);
|
|
free(*t);
|
|
return -1;
|
|
}
|
|
--
|
|
2.10.5.GIT
|
|
|