MAINT: C fixes

Two very minor patches.
Btw., I just looked at the lines you pointed out and there's a glaring memory leak there. In fact, there are memory leaks all over this module. If the last `malloc` fails, the memory from all the previous ones is never deallocated. I'll see if I can fix this.