restconf post/put/head/patch, memtests

This commit is contained in:
Olof hagsand 2017-03-26 15:14:37 +02:00
parent eec5896797
commit 19813a4d9c
17 changed files with 782 additions and 365 deletions

View file

@ -85,7 +85,6 @@ client_subscription_add(struct client_entry *ce,
{
struct client_subscription *su = NULL;
fprintf(stderr, "%s stream:%s filter:%s\n", __FUNCTION__, stream, filter);
if ((su = malloc(sizeof(*su))) == NULL){
clicon_err(OE_PLUGIN, errno, "malloc");
goto done;
@ -118,7 +117,6 @@ client_subscription_delete(struct client_entry *ce,
struct client_subscription *su;
struct client_subscription **su_prev;
fprintf(stderr, "%s stream:%s\n", __FUNCTION__, su0->su_stream);
su_prev = &ce->ce_subscription; /* this points to stack and is not real backpointer */
for (su = *su_prev; su; su = su->su_next){
if (su == su0){

View file

@ -441,7 +441,7 @@ backend_netconf_register_callback(clicon_handle h,
memset (nr, 0, sizeof (*nr));
nr->nr_callback = cb;
nr->nr_arg = arg;
nr->nr_tag = strdup(tag); /* strdup */
nr->nr_tag = strdup(tag); /* XXX strdup memleak */
INSQ(nr, deps);
return 0;
catch: