projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9fec73
)
ofproto: Fix segfault when changing command execution settings
author
Tetsuo NAKAGAWA
<nakagawa@mxc.nes.nec.co.jp>
Tue, 5 Jan 2010 02:19:47 +0000
(18:19 -0800)
committer
Justin Pettit
<jpettit@nicira.com>
Tue, 5 Jan 2010 02:19:47 +0000
(18:19 -0800)
If the remote command execution settings are changed and a NULL argument
is given for the directory, a crash would occur. With this change, the
default directory is used.
ofproto/executer.c
patch
|
blob
|
history
diff --git
a/ofproto/executer.c
b/ofproto/executer.c
index bc42ccf8693561bec579cb7832ee591dcff587b4..b78b0df09714bcf7f8026f490887d62d13c2f3b4 100644
(file)
--- a/
ofproto/executer.c
+++ b/
ofproto/executer.c
@@
-508,5
+508,7
@@
executer_set_acl(struct executer *e, const char *acl, const char *dir)
free(e->command_acl);
e->command_acl = xstrdup(acl);
free(e->command_dir);
- e->command_dir = xstrdup(dir);
+ e->command_dir = (dir
+ ? xstrdup(dir)
+ : xasprintf("%s/commands", ovs_pkgdatadir));
}