aitor_czr <[email protected]> writes: > Hi Edward, > > You are pointing *result to a pointer 'tmp' declared locally inside > the function 'essid_alloc', whose value will be lost outside it... > > Is it right?
No, it's not. At the point of the assignment, the value of tmp is some value returned by calloc. And that's a pointer to some memory on the heap which won't be deallocated automatically. In order to "point result to the pointer 'tmp'" the line would need to read *result = &tmp; which wouldn't compile because *result is a char * and &tmp a char **. _______________________________________________ Dng mailing list [email protected] https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
