projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29f015c
)
dpif: Fix fd leak in dpif_create().
author
Ben Pfaff
<blp@nicira.com>
Wed, 11 Mar 2009 21:32:24 +0000
(14:32 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Wed, 11 Mar 2009 21:44:57 +0000
(14:44 -0700)
lib/dpif.c
patch
|
blob
|
history
diff --git
a/lib/dpif.c
b/lib/dpif.c
index c179fbda10ed00f1edd632baf03b841a61afa01d..0109cda466a98110113cc10ad8eb8804b4a85198 100644
(file)
--- a/
lib/dpif.c
+++ b/
lib/dpif.c
@@
-176,8
+176,9
@@
dpif_create(const char *name, struct dpif *dpif)
error = ioctl(dpif->fd, ODP_DP_CREATE, name) < 0 ? errno : 0;
if (!error) {
return 0;
- } else if (error != EBUSY) {
- dpif_close(dpif);
+ }
+ dpif_close(dpif);
+ if (error != EBUSY) {
return error;
}
}