In relation to the rule "Never use something you free()d", I have the following question:
Is this allowed?
Or should I set foo to NULL before malloc()ing it again?Code:
char* foo;
foo = malloc(2);//2 bytes
<snip, do whatever with foo>
free(foo);
foo = malloc(10);