CodingStyle: Mention that "free" functions should accept a null pointer.
[openvswitch] / CodingStyle
index bbb492e3247f4d500cb29ce6a63c0a5d28f28d48..2ee189faf0f4bfe4b2734aeebce182392ef41943 100644 (file)
@@ -156,6 +156,12 @@ parameters and their corresponding size parameters should be paired.
         ...
     }
 
+Functions that destroy an instance of a dynamically-allocated type
+should accept and ignore a null pointer argument.  Code that calls
+such a function (including the C standard library function free())
+should omit a null-pointer check.  We find that this usually makes
+code easier to read.
+
 
 FUNCTION PROTOTYPES