Skip to content

Commit

Permalink
Issue 214: batch option parsing bug in tokstr library changes. versio…
Browse files Browse the repository at this point in the history
…n 2.6.4 (#215)
  • Loading branch information
djw1149 authored Aug 5, 2022
1 parent 767b883 commit 181c588
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion dnsdbq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ batch_options(const char *optstr, qparam_t options, qparam_ct dflt) {
/* dispense with extra spaces and tabs (empty fields). */
if (*tok == '\0')
continue;
*opt++ = tok;
*opt++ = strdup(tok);
}
tokstr_last(&ts);

Expand Down Expand Up @@ -1176,6 +1176,9 @@ batch_options(const char *optstr, qparam_t options, qparam_ct dflt) {
qparam_debug("batch", options);
}
/* done. */

for (int i = 0; i < opt - optv; i++)
free(optv[i]);
DESTROY(optv);
return msg;
}
Expand Down
2 changes: 1 addition & 1 deletion globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extern const struct verb verbs[];
#endif

EXTERN const char id_swclient[] INIT("dnsdbq");
EXTERN const char id_version[] INIT("2.6.3");
EXTERN const char id_version[] INIT("2.6.4");
EXTERN const char *program_name INIT(NULL);
EXTERN const char path_sort[] INIT("/usr/bin/sort");
EXTERN const char json_header[] INIT("Accept: application/json");
Expand Down

0 comments on commit 181c588

Please sign in to comment.