cdown / rpms / util-linux

Forked from rpms/util-linux 2 years ago
Clone
05ad79
diff -up util-linux-2.23.2/libmount/src/context_umount.c.kzak util-linux-2.23.2/libmount/src/context_umount.c
05ad79
--- util-linux-2.23.2/libmount/src/context_umount.c.kzak	2013-10-07 11:43:10.990598629 +0200
05ad79
+++ util-linux-2.23.2/libmount/src/context_umount.c	2013-10-07 11:46:01.051031431 +0200
05ad79
@@ -423,6 +423,8 @@ static int evaluate_permissions(struct l
05ad79
 		if (optstr && !mnt_optstr_get_option(optstr,
05ad79
 					"user", &mtab_user, &sz) && sz)
05ad79
 			ok = !strncmp(curr_user, mtab_user, sz);
05ad79
+
05ad79
+		free(curr_user);
05ad79
 	}
05ad79
 
05ad79
 	if (ok) {
05ad79
diff -up util-linux-2.23.2/libmount/src/utils.c.kzak util-linux-2.23.2/libmount/src/utils.c
05ad79
--- util-linux-2.23.2/libmount/src/utils.c.kzak	2013-07-30 11:15:27.391515623 +0200
05ad79
+++ util-linux-2.23.2/libmount/src/utils.c	2013-10-07 11:43:27.209924834 +0200
05ad79
@@ -159,7 +159,7 @@ int mnt_chdir_to_parent(const char *targ
05ad79
 		if (!last || !*last)
05ad79
 			memcpy(*filename, ".", 2);
05ad79
 		else
05ad79
-			memcpy(*filename, last, strlen(last) + 1);
05ad79
+			memmove(*filename, last, strlen(last) + 1);
05ad79
 	} else
05ad79
 		free(buf);
05ad79
 	return 0;