Bläddra i källkod

u-a: Fix a segfault when adding a new slave link to a link group

Return the correct slave link from alternative_add_slave(), instead of
the typoed sl variable.

Regression introduced in commit 9bbdca83fa1a8c817a2f8d02db493f173435a5af.

Closes: #731710

Reported-by: Julian Andres Klode <jak@debian.org>
Tested-by: Julian Andres Klode <jak@debian.org>
Tested-by: Roland Stigge <stigge@debian.org>
Guillem Jover 12 år sedan
förälder
incheckning
4be73ca0f4
2 ändrade filer med 4 tillägg och 1 borttagningar
  1. 3 0
      debian/changelog
  2. 1 1
      utils/update-alternatives.c

+ 3 - 0
debian/changelog

@@ -6,6 +6,9 @@ dpkg (1.17.5) UNRELEASED; urgency=low
     progress reporting output (i.e. dpkg-query). This was causing out-of-order
     error and debug messages in relation to normal progress reporting, which
     could be very confusing. Regression introduced in dpkg 1.17.2.
+  * Fix segfault in update-alternatives when adding or renaming slaves for
+    an existing alternative. Regression introduced in dpkg 1.17.2.
+    Closes: #731710
 
   [ Updated dpkg translations ]
   * German (Sven Joachim).

+ 1 - 1
utils/update-alternatives.c

@@ -980,7 +980,7 @@ alternative_add_slave(struct alternative *a, char *slave_name,
 	else
 		a->slaves = new;
 
-	return sl;
+	return new;
 }
 
 static void