From d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 1 Sep 2010 19:09:11 +0100 Subject: packages: Separate out most of the remaining packages into recipes Signed-off-by: Richard Purdie --- .../attr/attr-2.4.44/memory-leak-in-copy.patch | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 meta/recipes-support/attr/attr-2.4.44/memory-leak-in-copy.patch (limited to 'meta/recipes-support/attr/attr-2.4.44/memory-leak-in-copy.patch') diff --git a/meta/recipes-support/attr/attr-2.4.44/memory-leak-in-copy.patch b/meta/recipes-support/attr/attr-2.4.44/memory-leak-in-copy.patch new file mode 100644 index 0000000000..966632d87e --- /dev/null +++ b/meta/recipes-support/attr/attr-2.4.44/memory-leak-in-copy.patch @@ -0,0 +1,50 @@ +commit 972b42a67393f762936e74d3ce929914181f5f28 +Author: Brandon Philips +Date: Thu Dec 17 17:15:57 2009 -0800 + + libattr: fix memory leak in attr_copy_action() + + stanse found that attr_copy_action returns before freeing the memory + allocated for text. + + Move fopen() above the malloc so this is not a problem. + + Fixes this bug: + https://bugzilla.novell.com/show_bug.cgi?id=564735 + + Signed-off-by: Brandon Philips + +diff --git a/libattr/attr_copy_action.c b/libattr/attr_copy_action.c +index 0d7aca5..dc94224 100644 +--- a/libattr/attr_copy_action.c ++++ b/libattr/attr_copy_action.c +@@ -53,7 +53,7 @@ free_attr_actions(void) + static int + attr_parse_attr_conf(struct error_context *ctx) + { +- char *text, *t; ++ char *text = NULL, *t; + size_t size_guess = 4096, len; + FILE *file; + char *pattern = NULL; +@@ -64,15 +64,16 @@ attr_parse_attr_conf(struct error_context *ctx) + return 0; + + repeat: +- text = malloc(size_guess + 1); +- if (!text) +- goto fail; +- + if ((file = fopen(ATTR_CONF, "r")) == NULL) { + if (errno == ENOENT) + return 0; + goto fail; + } ++ ++ text = malloc(size_guess + 1); ++ if (!text) ++ goto fail; ++ + len = fread(text, 1, size_guess, file); + if (ferror(file)) + goto fail; -- cgit 1.2.3-korg