Show More
@@ -42,7 +42,7 b' struct cmdserveropts {' | |||||
42 | static void initcmdserveropts(struct cmdserveropts *opts) { |
|
42 | static void initcmdserveropts(struct cmdserveropts *opts) { | |
43 | memset(opts, 0, sizeof(struct cmdserveropts)); |
|
43 | memset(opts, 0, sizeof(struct cmdserveropts)); | |
44 | opts->lockfd = -1; |
|
44 | opts->lockfd = -1; | |
45 |
opts->sockdirfd = |
|
45 | opts->sockdirfd = -1; | |
46 | } |
|
46 | } | |
47 |
|
47 | |||
48 | static void freecmdserveropts(struct cmdserveropts *opts) { |
|
48 | static void freecmdserveropts(struct cmdserveropts *opts) { | |
@@ -50,9 +50,9 b' static void freecmdserveropts(struct cmd' | |||||
50 | opts->args = NULL; |
|
50 | opts->args = NULL; | |
51 | opts->argsize = 0; |
|
51 | opts->argsize = 0; | |
52 | assert(opts->lockfd == -1 && "should be closed by unlockcmdserver()"); |
|
52 | assert(opts->lockfd == -1 && "should be closed by unlockcmdserver()"); | |
53 |
if (opts->sockdirfd |
|
53 | if (opts->sockdirfd >= 0) { | |
54 | close(opts->sockdirfd); |
|
54 | close(opts->sockdirfd); | |
55 |
opts->sockdirfd = |
|
55 | opts->sockdirfd = -1; | |
56 | } |
|
56 | } | |
57 | } |
|
57 | } | |
58 |
|
58 |
General Comments 0
You need to be logged in to leave comments.
Login now