jdict

command line tool for looking up terms in yomidict dictionaries
git clone anongit@rnpnr.xyz:jdict.git
Log | Files | Refs | Feed | README | LICENSE

Commit: c7b7295f5de572d98a77d9d292758626989e60cc
Parent: 960bd6fdcc4a285820d128b6ff5677700477e470
Author: Randy Palamar
Date:   Sat, 16 Jul 2022 11:03:31 -0600

don't free terms when nterms == 0

if nterms == 0 then terms was never allocated and doesn't need to be freed

Diffstat:
Mjdict.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/jdict.c b/jdict.c @@ -279,10 +279,8 @@ main(int argc, char *argv[]) terms[i] = *argv; } - if (nterms == 0) { - free(terms); + if (nterms == 0) usage(); - } for (i = 0; i < ndicts; i++) find_and_print_defs(&dicts[i], terms, nterms);