[libpng16] Added missing "ptr = NULL" after some instances of png_free().