projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
relayd fix: trace chunk is reclaimed before close command
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
utils.c
diff --git
a/src/bin/lttng-relayd/utils.c
b/src/bin/lttng-relayd/utils.c
index 51fe19348d09f1378999d5ab3b6041b856f6132c..7ae0879e598674007cdee164cee4d2ff2c263c70 100644
(file)
--- a/
src/bin/lttng-relayd/utils.c
+++ b/
src/bin/lttng-relayd/utils.c
@@
-29,11
+29,10
@@
#include "lttng-relayd.h"
#include "utils.h"
#include "lttng-relayd.h"
#include "utils.h"
-static char *create_output_path_auto(char *path_name)
+static char *create_output_path_auto(c
onst c
har *path_name)
{
int ret;
char *traces_path = NULL;
{
int ret;
char *traces_path = NULL;
- char *alloc_path = NULL;
char *default_path;
default_path = utils_get_home_dir();
char *default_path;
default_path = utils_get_home_dir();
@@
-42,23
+41,17
@@
static char *create_output_path_auto(char *path_name)
Please specify an output path using -o, --output PATH");
goto exit;
}
Please specify an output path using -o, --output PATH");
goto exit;
}
- alloc_path = strdup(default_path);
- if (alloc_path == NULL) {
- PERROR("Path allocation");
- goto exit;
- }
ret = asprintf(&traces_path, "%s/" DEFAULT_TRACE_DIR_NAME
ret = asprintf(&traces_path, "%s/" DEFAULT_TRACE_DIR_NAME
- "/%s",
alloc
_path, path_name);
+ "/%s",
default
_path, path_name);
if (ret < 0) {
PERROR("asprintf trace dir name");
goto exit;
}
exit:
if (ret < 0) {
PERROR("asprintf trace dir name");
goto exit;
}
exit:
- free(alloc_path);
return traces_path;
}
return traces_path;
}
-static char *create_output_path_noauto(char *path_name)
+static char *create_output_path_noauto(c
onst c
har *path_name)
{
int ret;
char *traces_path = NULL;
{
int ret;
char *traces_path = NULL;
@@
-84,7
+77,7
@@
exit:
*
* Return the allocated string containing the path name or else NULL.
*/
*
* Return the allocated string containing the path name or else NULL.
*/
-char *create_output_path(char *path_name)
+char *create_output_path(c
onst c
har *path_name)
{
assert(path_name);
{
assert(path_name);
This page took
0.024553 seconds
and
4
git commands to generate.