What is the proper way of assigning null pointers in runtime. If I do the following:
struct list *s=malloc(sizeo f(list));
free(s);
s=NULL;
the program will work but Valgrind will give a complaint "Invalid write of size 4".
Cheers,
Antti
struct list *s=malloc(sizeo f(list));
free(s);
s=NULL;
the program will work but Valgrind will give a complaint "Invalid write of size 4".
Cheers,
Antti
Comment