Skip to contentSkip to conversation

patch libsecure

PATCH Carsten Grohmann 2 participants 2 messages Apr 23, 2003 – Apr 24, 2003 SELinux security module

lore
Share & tools
lore
#0 lore raw

Hi,

I missing some free calls in the libsecure test files. The attached patch insert this calls.

Carsten

? patch.libsecure
Index: test/getsecsid.c
===================================================================
RCS file: /cvsroot/selinux/nsa/selinux/libsecure/test/getsecsid.c,v retrieving revision 1.1.1.1

getsecsid.c +1 -1
diff -u -r1.1.1.1 getsecsid.c
@@ -51,6 +51,6 @@
 	}
 
 	printf("Context:  %s\n", scontext);
-
+	free(scontext);
 	exit(0);
 }

Index: test/lstat_s.c
===================================================================
RCS file: /cvsroot/selinux/nsa/selinux/libsecure/test/lstat_s.c,v retrieving revision 1.1.1.1

lstat_s.c +1 -0
diff -u -r1.1.1.1 lstat_s.c
@@ -48,6 +48,7 @@
 		}
 
 		printf("Context:  %s\n", context);
+		free(context);
 	}
 
 	exit(0);

Index: test/sid_to_context.c
===================================================================
RCS file: /cvsroot/selinux/nsa/selinux/libsecure/test/sid_to_context.c,v retrieving revision 1.1.1.1

sid_to_context.c +1 -0
diff -u -r1.1.1.1 sid_to_context.c
@@ -43,5 +43,6 @@
 	}
 
 	printf("%s\n", buf);
+	free(buf);
 	exit(0);
 }

Index: test/stat_s.c
===================================================================
RCS file: /cvsroot/selinux/nsa/selinux/libsecure/test/stat_s.c,v retrieving revision 1.1.1.1

stat_s.c +1 -0
diff -u -r1.1.1.1 stat_s.c
@@ -48,6 +48,7 @@
 		}
 
 		printf("Context:  %s\n", context);
+		free(context);
 	}
 
 	exit(0);

Index: test/statfs_s.c
===================================================================
RCS file: /cvsroot/selinux/nsa/selinux/libsecure/test/statfs_s.c,v retrieving revision 1.1.1.1

statfs_s.c +1 -0
diff -u -r1.1.1.1 statfs_s.c
@@ -48,6 +48,7 @@
 		}
 
 		printf("Context:  %s\n", context);
+		free(context);
 	}
 
 	exit(0);

Index: test/arch/i386/stat64_s.c
===================================================================
RCS file: /cvsroot/selinux/nsa/selinux/libsecure/test/arch/i386/stat64_s.c,v retrieving revision 1.1.1.1

arch/i386/stat64_s.c +1 -0
diff -u -r1.1.1.1 stat64_s.c
@@ -49,6 +49,7 @@
 		}
 
 		printf("Context:  %s\n", context);
+		free(context);
 	}
 
 	exit(0);
#1 lore raw
Quoted 2 lines · Carsten Grohmann

I missing some free calls in the libsecure test files. The attached patch insert this calls.

Looks good, I have added it to my tree.

Signature · 10 lines
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page


--
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.