POSIX says free(NULL) is valid and no action. https://pubs.opengroup.org/onlinepubs/009695399/functions/free.html
--joel On Sun, Jan 12, 2025, 12:46 AM Hal Murray via devel <devel@ntpsec.org> wrote: > > The Linux man page says > If ptr is NULL, no operation is performed. > > I'd expect a wrapper if there really was a problem. > > This code is in ntpd/ntp_config.c > if (NULL == s) { /* free() hates NULL */ > s = estrdup(""); > } > > Any reason not to nuke that chunk of code? > > > -- > These are my opinions. I hate spam. > > > > _______________________________________________ > devel mailing list > devel@ntpsec.org > https://lists.ntpsec.org/mailman/listinfo/devel >
_______________________________________________ devel mailing list devel@ntpsec.org https://lists.ntpsec.org/mailman/listinfo/devel