All of lore.kernel.org
 help / color / mirror / Atom feed
* Memory leak in libselinux/src/label_file.c
@ 2009-04-03  4:58 Hiroshi Shinji
  2009-05-07 19:20 ` Chad Sellers
  0 siblings, 1 reply; 3+ messages in thread
From: Hiroshi Shinji @ 2009-04-03  4:58 UTC (permalink / raw)
  To: selinux

[-- Attachment #1: Type: text/plain, Size: 102 bytes --]

Hi,

I found memory leak in libselinux/src/label_file.c.
Please fix it.

Regards,

-- 
Hiroshi Shinji

[-- Attachment #2: label_file.patch --]
[-- Type: text/x-diff, Size: 462 bytes --]

diff --git a/libselinux/src/label_file.c b/libselinux/src/label_file.c
index 5043f09..b5e904f 100644
--- a/libselinux/src/label_file.c
+++ b/libselinux/src/label_file.c
@@ -299,6 +299,8 @@ static int process_line(struct selabel_handle *rec,
 		COMPAT_LOG(SELINUX_WARNING,
 			    "%s:  line %d is missing fields, skipping\n", path,
 			    lineno);
+		if (items == 1)
+			free(regex);
 		return 0;
 	} else if (items == 2) {
 		/* The type field is optional. */

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Memory leak in libselinux/src/label_file.c
  2009-04-03  4:58 Memory leak in libselinux/src/label_file.c Hiroshi Shinji
@ 2009-05-07 19:20 ` Chad Sellers
  2009-05-18 15:30   ` Joshua Brindle
  0 siblings, 1 reply; 3+ messages in thread
From: Chad Sellers @ 2009-05-07 19:20 UTC (permalink / raw)
  To: Hiroshi Shinji, selinux

On 4/3/09 12:58 AM, "Hiroshi Shinji" <hiroshi.shinji@gmail.com> wrote:

> Hi,
> 
> I found memory leak in libselinux/src/label_file.c.
> Please fix it.
> 
> Regards,

This looks good to me.

Acked-by: Chad Sellers <csellers@tresys.com>



--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Memory leak in libselinux/src/label_file.c
  2009-05-07 19:20 ` Chad Sellers
@ 2009-05-18 15:30   ` Joshua Brindle
  0 siblings, 0 replies; 3+ messages in thread
From: Joshua Brindle @ 2009-05-18 15:30 UTC (permalink / raw)
  To: Chad Sellers; +Cc: Hiroshi Shinji, selinux

Chad Sellers wrote:
> On 4/3/09 12:58 AM, "Hiroshi Shinji" <hiroshi.shinji@gmail.com> wrote:
> 
>> Hi,
>>
>> I found memory leak in libselinux/src/label_file.c.
>> Please fix it.
>>
>> Regards,
> 
> This looks good to me.
> 
> Acked-by: Chad Sellers <csellers@tresys.com>
> 

Merged in libselinux-2.0.81


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-05-18 15:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-03  4:58 Memory leak in libselinux/src/label_file.c Hiroshi Shinji
2009-05-07 19:20 ` Chad Sellers
2009-05-18 15:30   ` Joshua Brindle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.