Attention is currently required from: falconia, fixeria, pespin.
1 comment:
File include/osmocom/hlr/hlr_sms.h:
Patch Set #2, Line 17: void smsc_del(struct hlr_smsc *smsc);
Removing from llist is in general fine instead the _free function too, you can see plenty of example […]
I think we need to differntiate between
a) a pure "foo_free" function which primarily is a about releasing memory
b) some function that does more additional work, where e.g. a route is added or deleted. in that case add+del is fine.
Now the problem starts to be problematic if we have "alloc" on the creation side and "del" on the release side. That really just looks wrong. so either it's add+del, or it's alloc+free.
strictly speaking, an "alloc" function should not add it to a list, and a free function shouldn'd delete it. So either you have add/del doing the alloc/free automagically, or you have orthogonal alloc -> add -> del -> free functions.
To view, visit change 34448. To unsubscribe, or for help writing mail filters, visit settings.