Make dpif_close() accept a null pointer.

It's customary for destructor functions to accept and ignore null pointers.

This commit does not fix any known bug.
This commit is contained in:
Ben Pfaff committed 2008-11-26 22:25:39 -08:00
1 parent 58b3bc45e4
commit 12333d6650
1 file changed
+3 -1
+3 -1
View File
@@ -103,7 +103,9 @@ dpif_open(int dp_idx, bool subscribe, struct dpif *dp)
void
dpif_close(struct dpif *dp)
{
nl_sock_destroy(dp->sock);
if (dp) {
nl_sock_destroy(dp->sock);
}
}
static const struct nl_policy openflow_policy[] = {