projects
/
collection4.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
src/graph_instance.c: Properly escape parameters.
[collection4.git]
/
src
/
graph_def.c
diff --git
a/src/graph_def.c
b/src/graph_def.c
index
9aba1ce
..
b358905
100644
(file)
--- a/
src/graph_def.c
+++ b/
src/graph_def.c
@@
-158,15
+158,22
@@
graph_def_t *def_create (graph_config_t *cfg, graph_ident_t *ident, /* {{{ */
graph_def_t *ret;
if ((cfg == NULL) || (ident == NULL) || (ds_name == NULL))
graph_def_t *ret;
if ((cfg == NULL) || (ident == NULL) || (ds_name == NULL))
+ {
+ fprintf (stderr, "def_create: An argument is NULL\n");
return (NULL);
return (NULL);
+ }
selector = graph_get_selector (cfg);
if (selector == NULL)
selector = graph_get_selector (cfg);
if (selector == NULL)
+ {
+ fprintf (stderr, "def_create: graph_get_selector failed\n");
return (NULL);
return (NULL);
+ }
ret = malloc (sizeof (*ret));
if (ret == NULL)
{
ret = malloc (sizeof (*ret));
if (ret == NULL)
{
+ fprintf (stderr, "def_create: malloc failed\n");
ident_destroy (selector);
return (NULL);
}
ident_destroy (selector);
return (NULL);
}
@@
-177,6
+184,7
@@
graph_def_t *def_create (graph_config_t *cfg, graph_ident_t *ident, /* {{{ */
ret->ds_name = strdup (ds_name);
if (ret->ds_name == NULL)
{
ret->ds_name = strdup (ds_name);
if (ret->ds_name == NULL)
{
+ fprintf (stderr, "def_create: Unable to copy DS name\n");
ident_destroy (selector);
free (ret);
return (NULL);
ident_destroy (selector);
free (ret);
return (NULL);
@@
-186,9
+194,10
@@
graph_def_t *def_create (graph_config_t *cfg, graph_ident_t *ident, /* {{{ */
ret->next = NULL;
ret->select = ident_copy_with_selector (selector, ident,
ret->next = NULL;
ret->select = ident_copy_with_selector (selector, ident,
- IDENT_FLAG_REPLACE_A
NY
);
+ IDENT_FLAG_REPLACE_A
LL
);
if (ret->select == NULL)
{
if (ret->select == NULL)
{
+ fprintf (stderr, "def_create: ident_copy_with_selector failed\n");
ident_destroy (selector);
free (ret->ds_name);
free (ret);
ident_destroy (selector);
free (ret->ds_name);
free (ret);