X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-crash%2Flttng-crash.cpp;fp=src%2Fbin%2Flttng-crash%2Flttng-crash.cpp;h=f63ececc09d861049342883c65a4afb86df263e3;hp=0b4afc91bdfa49a95ed980fcd33f25cf3b627de4;hb=64803277bbdbe0a943360d918298a48157d9da55;hpb=60f1b42d6280b6bd386abb726dca4fd3b31d8491 diff --git a/src/bin/lttng-crash/lttng-crash.cpp b/src/bin/lttng-crash/lttng-crash.cpp index 0b4afc91b..f63ececc0 100644 --- a/src/bin/lttng-crash/lttng-crash.cpp +++ b/src/bin/lttng-crash/lttng-crash.cpp @@ -781,7 +781,7 @@ int copy_crash_data(const struct lttng_crash_layout *layout, int fd_dest, return ret; } src_file_len = layout->mmap_length; - buf = (char *) zmalloc(src_file_len); + buf = calloc(src_file_len); if (!buf) { return -1; } @@ -1129,7 +1129,7 @@ int delete_dir_recursive(const char *path) } if (S_ISDIR(st.st_mode)) { - char *subpath = (char *) zmalloc(PATH_MAX); + char *subpath = calloc(PATH_MAX); if (!subpath) { PERROR("zmalloc path");