This is The Way To Do It.  I take minor issue to calling free(NULL) abuse, though (I know you get it, but allow me to soapbox).  I&#x27;ve known programmers who get squeamish relying on this, as if it&#x27;s a hack, even though it&#x27;s been mandated by the standard forever.  It&#x27;s like they believe someone would put together a fully-functional libc and miss that simple requirement somehow.<p>I think the C standard library would be easier to work with if they would&#x27;ve taken this further, and required, for example, fclose(NULL) to be a no-op.