don't forget to delete addr pointers

This commit is contained in:
Julien Danjou 2007-10-29 16:23:05 +01:00
parent c8e489d4c9
commit 7476a9712a
2 changed files with 3 additions and 0 deletions

View file

@ -47,6 +47,8 @@ main()
(const struct sockaddr *) addr, sizeof(struct sockaddr_un)) == -1) (const struct sockaddr *) addr, sizeof(struct sockaddr_un)) == -1)
perror("error sending datagram"); perror("error sending datagram");
p_delete(&addr);
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99

View file

@ -410,6 +410,7 @@ main(int argc, char *argv[])
perror("error closing UNIX domain socket"); perror("error closing UNIX domain socket");
if(unlink(addr->sun_path)) if(unlink(addr->sun_path))
perror("error unlinking UNIX domain socket"); perror("error unlinking UNIX domain socket");
p_delete(&addr);
cleanup(awesomeconf); cleanup(awesomeconf);
XCloseDisplay(dpy); XCloseDisplay(dpy);