projects
/
platform
/
upstream
/
ltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
initial prototypes-from-dwarf implementation
[platform/upstream/ltrace.git]
/
read_config_file.c
diff --git
a/read_config_file.c
b/read_config_file.c
index
b59cff4
..
ea3ab88
100644
(file)
--- a/
read_config_file.c
+++ b/
read_config_file.c
@@
-541,12
+541,12
@@
unshare_type_info(struct locus *loc, struct arg_type_info **infop, int *ownp)
return 0;
struct arg_type_info *ninfo = malloc(sizeof(*ninfo));
return 0;
struct arg_type_info *ninfo = malloc(sizeof(*ninfo));
- if (ninfo == NULL) {
+ if (ninfo == NULL
|| type_clone(ninfo, *infop) < 0
) {
report_error(loc->filename, loc->line_no,
"malloc: %s", strerror(errno));
report_error(loc->filename, loc->line_no,
"malloc: %s", strerror(errno));
+ free(ninfo);
return -1;
}
return -1;
}
- *ninfo = **infop;
*infop = ninfo;
*ownp = 1;
return 0;
*infop = ninfo;
*ownp = 1;
return 0;
@@
-696,14
+696,15
@@
try_parse_kwd(char **str, const char *kwd)
{
size_t len = strlen(kwd);
if (strncmp(*str, kwd, len) == 0
{
size_t len = strlen(kwd);
if (strncmp(*str, kwd, len) == 0
- && !isalnum(CTYPE_CONV((*str)[len]))) {
+ && !isalnum(CTYPE_CONV((*str)[len]))
+ && (*str)[len] != '_') {
(*str) += len;
return 0;
}
return -1;
}
(*str) += len;
return 0;
}
return -1;
}
-/* XXX
extra_param and param_num
are a kludge to get in
+/* XXX
EXTRA_PARAM and PARAM_NUM
are a kludge to get in
* backward-compatible support for "format" parameter type. The
* latter is only valid if the former is non-NULL, which is only in
* top-level context. */
* backward-compatible support for "format" parameter type. The
* latter is only valid if the former is non-NULL, which is only in
* top-level context. */