openbsd-ports/audio/shell-fm/patches/patch-source_sckif_c

28 lines
612 B
Plaintext

$OpenBSD: patch-source_sckif_c,v 1.2 2011/09/27 12:11:56 dcoppa Exp $
Avoid double free crash
(upstream git commit 5a43a40df8f9b000c0f8e1c1e0b40813047620b3)
--- source/sckif.c.orig Wed May 25 12:35:38 2011
+++ source/sckif.c Tue Sep 27 14:09:38 2011
@@ -38,6 +38,7 @@
#include "globals.h"
#include "split.h"
+#include "ropen.h"
struct hash track;
@@ -191,10 +192,7 @@ void handle_client(int client_socket) {
if(disconnect) {
debug("removing client\n");
- shutdown(SHUT_RDWR, client_socket);
- close(client_socket);
- fclose(fd);
-
+ fshutdown(& fd);
remove_handle(client_socket);
}
}