Skip to content

Commit ab8ce7e

Browse files
committed
popt changes
1 parent 877bdce commit ab8ce7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sqlexpand.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,8 +807,8 @@ main (int argc, const char *argv[])
807807
int dozero = 0;
808808
int doblank = 0;
809809
const char *query = NULL;
810+
poptContext optCon; // context for parsing command-line options
810811
{ // POPT
811-
poptContext optCon; // context for parsing command-line options
812812
const struct poptOption optionsTable[] = {
813813
{"stdin", 0, POPT_ARG_NONE, &dostdin, 0, "Allow stdin ($-)"},
814814
{"file", 0, POPT_ARG_NONE, &dofile, 0, "Allow file ($@)"},
@@ -836,7 +836,6 @@ main (int argc, const char *argv[])
836836
poptPrintUsage (optCon, stderr, 0);
837837
return -1;
838838
}
839-
poptFreeContext (optCon);
840839
}
841840

842841
unsigned int flags = 0;
@@ -859,6 +858,7 @@ main (int argc, const char *argv[])
859858
if (e)
860859
warnx ("Warning SQL expansion: %s\n[%s]\n[%s]\n[%s]", e, query, expanded, p);
861860
free (expanded);
861+
poptFreeContext (optCon);
862862
return 0;
863863
}
864864
#endif

0 commit comments

Comments
 (0)