diff --git a/contrib/chg/chg.c b/contrib/chg/chg.c --- a/contrib/chg/chg.c +++ b/contrib/chg/chg.c @@ -49,6 +49,7 @@ static void freecmdserveropts(struct cmd free(opts->args); opts->args = NULL; opts->argsize = 0; + assert(opts->lockfd == -1 && "should be closed by unlockcmdserver()"); if (opts->sockdirfd != AT_FDCWD) { close(opts->sockdirfd); opts->sockdirfd = AT_FDCWD;