Просмотр исходного кода

u-a: Do not leak subcall command arguments

Guillem Jover лет назад: 14
Родитель
Сommit
1e09bb02ac
2 измененных файлов с 2 добавлено и 0 удалено
  1. 1 0
      debian/changelog
  2. 1 0
      utils/update-alternatives.c

+ 1 - 0
debian/changelog

@@ -16,6 +16,7 @@ dpkg (1.16.9) UNRELEASED; urgency=low
     Closes: #687656
   * Fix update-alternatives test suite to behave correctly on non-Debian
     binary paths. Known to be affecting at least Gentoo and Mac OS X.
+  * Do not leak subcall command arguments in update-alternatives.
 
   [ Updated programs translations ]
   * Czech (Miroslav Kure).

+ 1 - 0
utils/update-alternatives.c

@@ -455,6 +455,7 @@ subcall(const char *prog, ...)
 
 	/* Run the command */
 	res = spawn(prog, cmd);
+	free(cmd);
 	if (WIFEXITED(res) && WEXITSTATUS(res) == 0)
 		return;
 	if (WIFEXITED(res))