Feb. 9, 1994
7:43 p.m.
+ /* We must make a copy in case the + passed pointer is a read-only string. */ + char *name = ecpyalloc (argname); + if ((cp = name) == NULL || *cp == '\0') { + free (name); + return 0; + } ecpyalloc(x) [a.k.a. memcheck(icpyalloc(x))] cannot return 0. But, if you just want to program defensively, it is also good practice not to pass 0 to free(), despite what any standards might say. With the ialloc package you can achieve this via ifree(). Bradley
11759
Age (days ago)
11759
Last active (days ago)
0 comments
1 participants
participants (1)
-
Bradley White