On Tue, Jan 20, 2015 at 05:12:06PM +0100, Sumit Bose wrote:
el = ldb_msg_find_element(msg, orig_attr_list[c]);if (el != NULL && el->num_values > 0) {if (el->num_values > 1) {array_size += el->num_values;Aren't we allocating one more sized_string than required here? We already allocated one item previously..
Not a big deal though, it's just tmp_ctx memory..
yes, you are right, but since I was already generous in the initial allocation by using just the full number of possible attributes and not checking if they are already set or not I thought I can skip doing the -1 here as well. But if you prefer I can add it.
It's fine since it's a tmp_ctx.
ACK to the first patch as well.