projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58b3bc4
)
Make dpif_close() accept a null pointer.
author
Ben Pfaff
<blp@nicira.com>
Thu, 27 Nov 2008 00:07:56 +0000
(16:07 -0800)
committer
Ben Pfaff
<blp@nicira.com>
Thu, 27 Nov 2008 06:25:39 +0000
(22:25 -0800)
It's customary for destructor functions to accept and ignore null pointers.
This commit does not fix any known bug.
lib/dpif.c
patch
|
blob
|
history
diff --git
a/lib/dpif.c
b/lib/dpif.c
index 5739e18aaebe44651848baeb37155c143aff9282..6407490def8ebf7f33f7f5876f5cb7030da0908b 100644
(file)
--- a/
lib/dpif.c
+++ b/
lib/dpif.c
@@
-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[] = {