Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111632262
D34355.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
693 B
Referenced Files
None
Subscribers
None
D34355.diff
View Options
diff --git a/usr.sbin/rtsold/cap_script.c b/usr.sbin/rtsold/cap_script.c
--- a/usr.sbin/rtsold/cap_script.c
+++ b/usr.sbin/rtsold/cap_script.c
@@ -162,7 +162,7 @@
const char *const *iargv, *const *scripts;
char **argv;
size_t argc, i, nscripts;
- int fd, status;
+ int error, fd, status;
if (strcmp(cmd, "script_wait") == 0) {
/* Wait for the result of a previous "script_run" command. */
@@ -198,8 +198,10 @@
memcpy(argv, iargv, sizeof(*argv) * argc);
fd = script_run(argv);
+ error = errno;
+ free(argv);
if (fd < 0)
- return (errno);
+ return (error);
(void)caph_rights_limit(fd, cap_rights_init(&rights, CAP_WRITE));
nvlist_move_descriptor(nvlout, "fd", fd);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 7, 7:00 AM (18 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17027077
Default Alt Text
D34355.diff (693 B)
Attached To
Mode
D34355: rtsold: fix memory leak in script execution
Attached
Detach File
Event Timeline
Log In to Comment