projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a copy method to the trace chunk interface
[lttng-tools.git]
/
src
/
common
/
lttng-elf.c
diff --git
a/src/common/lttng-elf.c
b/src/common/lttng-elf.c
index b2aa88487e1dff286c21d0442f6cdf175a68681f..5d4b93bbb80d13943571fede84f82057dea3a09d 100644
(file)
--- a/
src/common/lttng-elf.c
+++ b/
src/common/lttng-elf.c
@@
-605,6
+605,7
@@
int lttng_elf_get_section_hdr_by_name(struct lttng_elf *elf,
char *curr_section_name;
for (i = 0; i < elf->ehdr->e_shnum; ++i) {
char *curr_section_name;
for (i = 0; i < elf->ehdr->e_shnum; ++i) {
+ bool name_equal;
int ret = lttng_elf_get_section_hdr(elf, i, section_hdr);
if (ret) {
int ret = lttng_elf_get_section_hdr(elf, i, section_hdr);
if (ret) {
@@
-615,7
+616,9
@@
int lttng_elf_get_section_hdr_by_name(struct lttng_elf *elf,
if (!curr_section_name) {
continue;
}
if (!curr_section_name) {
continue;
}
- if (strcmp(curr_section_name, section_name) == 0) {
+ name_equal = strcmp(curr_section_name, section_name) == 0;
+ free(curr_section_name);
+ if (name_equal) {
return 0;
}
}
return 0;
}
}
This page took
0.024009 seconds
and
5
git commands to generate.