It doesn't cover more complicated use cases, but I am ok with it. One more parameter in the init function and the struct grows again by 32/64 bit ... peanuts anyway. In exchange we don't need a second method.

Yeah, if you add the NULL check on the data_free, I will be ok with it.