commit - 6399317229fecd3f66b97e59a49e9ba0c8b3ffef
commit + 24ffb139191238b206dc06c73aa1d9e62b84e1a7
blob - cd792694a80c21a597816e533adeabc69ffbd3fa
blob + ebf1f89e9b0a3fbe0507873680fdddc97eacc91f
--- thingsctl/thingsctl.c
+++ thingsctl/thingsctl.c
/*
+ * Copyright (c) 2019 - 2020 Tracey Emery <tracey@traceyemery.net>
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
int type;
char *sockname, *ctl_pkt;
- sockname = THINGSD_SOCK;
+ sockname = strdup(THINGSD_SOCK);
+ if (sockname == NULL)
+ err(1, "strdup");
while ((ch = getopt(argc, argv, "s:")) != -1) {
switch (ch) {
case 's':
}
close(ctl_sock);
free(ibuf);
+ free(sockname);
return (0);
}
blob - c5fbef05f92091c5d41797cde55c5dceaa591db3
blob + 97618eb47412c18f85263cf25273ea6ef5735878
--- thingsd/sockets.c
+++ thingsd/sockets.c
/*
- * Copyright (c) 2016, 2019 Tracey Emery <tracey@traceyemery.net>
+ * Copyright (c) 2016, 2019-2020 Tracey Emery <tracey@traceyemery.net>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
thg->exists = true;
thg->fd = conn_sock->fd;
}
- recreate:
+recreate:
if (thg->ipaddr != NULL) {
thg->type = TCP;
if (thg->persist == 1) {