File autofs-5.0.9-task-use-after-free.patch of Package autofs.14028

From: Leonardo Chiquitto <>
Subject: fix segmentation fault in st_queue_handler()
References: bnc#727392
Git-commit: aafbd06a964145edbd443f79c442a51ccac565a6
Note: Git commit is functionally the same but different in position

Index: autofs-5.0.9/daemon/state.c
--- autofs-5.0.9.orig/daemon/state.c
+++ autofs-5.0.9/daemon/state.c
@@ -1171,12 +1171,12 @@ remove:
 							struct state_queue, pending);
-				free(task);
 				list_add_tail(&next->list, head);
 				if (p == head)
 					p = head->next;
+				free(task);
 			if (list_empty(head))
openSUSE Build Service is sponsored by