Skip to contentSkip to conversation

Memory leak in libselinux/src/label_file.c

PATCH Hiroshi Shinji 3 participants 3 messages Apr 3, 2009 – May 18, 2009 SELinux security module

lore
Share & tools
lore
#0 lore raw

Hi,

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

Regards,

Signature · 1 line
Hiroshi Shinji
libselinux/src/label_file.c +2 -0
index 5043f09..b5e904f 100644
@@ -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. */
Acked-by
#1 lore raw
Quoted 6 lines · Hiroshi Shinji

Hi,

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

Regards,

This looks good to me.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#2 lore raw
Quoted 4 lines · Chad Sellers
Quoted 2 lines · Hiroshi Shinji

Hi,

Quoted 9 lines
Quoted 4 lines

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

Regards,

This looks good to me.

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 [email protected] with the words "unsubscribe selinux" without quotes as the message.