This code used to check/free multiple things, so the argument to free() was not always NULL. After the code was simplified, the free() became redundant.