mem_free_if(data) instead of if (data) mem_free(data). Shorter.