From: Justin Pettit Date: Tue, 14 Oct 2008 06:37:46 +0000 (-0700) Subject: Fix dereference of previously freed data. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4528f887d1f035ad74388598e119f34a4910d3c3;p=openvswitch Fix dereference of previously freed data. Thanks to Masa et al. for catching this. --- diff --git a/lib/vlog-socket.c b/lib/vlog-socket.c index 2428bfa6..ec0b6d4c 100644 --- a/lib/vlog-socket.c +++ b/lib/vlog-socket.c @@ -92,10 +92,10 @@ vlog_server_listen(const char *path, struct vlog_server **serverp) server->fd = make_unix_socket(SOCK_DGRAM, true, true, server->path, NULL); if (server->fd < 0) { int fd = server->fd; - free(server->path); - free(server); fprintf(stderr, "Could not initialize vlog configuration socket: %s\n", strerror(-server->fd)); + free(server->path); + free(server); if (serverp) { *serverp = NULL; }