[krbdev.mit.edu #7140] krb5-1.10.1 iprop issues

Richard Basch via RT rt-comment at krbdev.mit.edu
Sat May 19 16:41:33 EDT 2012


Fair enough... I still remember those null dereference SIGSEGV crashes from
the 80s and early 90s, before c89 was ubiquitous.

However, what was more interesting was the code in some affected sections
had some "if (ptr) free(ptr)" clauses pre-existing, so I figured you were
still coding defensively for pre-c89 compilers (what I saw in the code was a
mix of "blind " and "conditional" free statements).  Basically, it should be
consistent... either all "blind" or all "conditional".


-----Original Message-----
From: Greg Hudson via RT [mailto:rt-comment at krbdev.mit.edu] 
Sent: Thursday, May 17, 2012 8:09 PM
To: basch at alum.mit.edu
Subject: [krbdev.mit.edu #7140] krb5-1.10.1 iprop issues 

Just a quick response without having done more than glance at the patch: 
it's our current practice to call free() without checking for null, as C89 
guarantees that free() is a no-op in that case.  Similarly for 
krb5_free_foo().




More information about the krb5-bugs mailing list