[Pkg-shadow-commits] r3456 - in upstream/trunk: . libmisc

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Sat Jul 30 01:38:08 UTC 2011


Author: nekral-guest
Date: 2011-07-30 01:38:07 +0000 (Sat, 30 Jul 2011)
New Revision: 3456

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/libmisc/find_new_gid.c
   upstream/trunk/libmisc/find_new_uid.c
Log:
	* libmisc/find_new_uid.c: free (used_uids) on return.
	* libmisc/find_new_gid.c: free (used_gids) on return.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2011-07-28 15:19:40 UTC (rev 3455)
+++ upstream/trunk/ChangeLog	2011-07-30 01:38:07 UTC (rev 3456)
@@ -1,3 +1,8 @@
+2011-07-30  Nicolas François  <nicolas.francois at centraliens.net>
+
+	* libmisc/find_new_uid.c: free (used_uids) on return.
+	* libmisc/find_new_gid.c: free (used_gids) on return.
+
 2011-07-28  Nicolas François  <nicolas.francois at centraliens.net>
 
 	* lib/commonio.c: Fix NIS commit from 2011-07-14.

Modified: upstream/trunk/libmisc/find_new_gid.c
===================================================================
--- upstream/trunk/libmisc/find_new_gid.c	2011-07-28 15:19:40 UTC (rev 3455)
+++ upstream/trunk/libmisc/find_new_gid.c	2011-07-30 01:38:07 UTC (rev 3456)
@@ -96,6 +96,7 @@
 	     * changes */
 	    && (gr_locate_gid (*preferred_gid) == NULL)) {
 		*gid = *preferred_gid;
+		free (used_gids);
 		return 0;
 	}
 
@@ -179,6 +180,7 @@
 				         Prog);
 				SYSLOG ((LOG_WARN,
 				         "no more available GID on the system"));
+				free (used_gids);
 				return -1;
 			}
 		}
@@ -194,6 +196,7 @@
 				         _("%s: Can't get unique GID (no more available GIDs)\n"),
 				         Prog);
 				SYSLOG ((LOG_WARN, "no more available GID on the system"));
+				free (used_gids);
 				return -1;
 			}
 		}

Modified: upstream/trunk/libmisc/find_new_uid.c
===================================================================
--- upstream/trunk/libmisc/find_new_uid.c	2011-07-28 15:19:40 UTC (rev 3455)
+++ upstream/trunk/libmisc/find_new_uid.c	2011-07-30 01:38:07 UTC (rev 3456)
@@ -96,6 +96,7 @@
 	     * changes */
 	    && (pw_locate_uid (*preferred_uid) == NULL)) {
 		*uid = *preferred_uid;
+		free (used_uids);
 		return 0;
 	}
 
@@ -179,6 +180,7 @@
 				         Prog);
 				SYSLOG ((LOG_WARN,
 				         "no more available UID on the system"));
+				free (used_uids);
 				return -1;
 			}
 		}
@@ -194,6 +196,7 @@
 				         _("%s: Can't get unique UID (no more available UIDs)\n"),
 				         Prog);
 				SYSLOG ((LOG_WARN, "no more available UID on the system"));
+				free (used_uids);
 				return -1;
 			}
 		}




More information about the Pkg-shadow-commits mailing list