Segfault Fixt
diff --git a/nlsr.c b/nlsr.c
index ad30f67..ec250fa 100644
--- a/nlsr.c
+++ b/nlsr.c
@@ -964,7 +964,8 @@
hashtb_end(e);
}
- char *
+
+char *
process_api_client_command(char *command)
{
char *msg;
diff --git a/nlsr_fib.c b/nlsr_fib.c
index a83899d..25532b4 100644
--- a/nlsr_fib.c
+++ b/nlsr_fib.c
@@ -113,12 +113,15 @@
return res;
cleanup:
- ccn_forwarding_entry_destroy(&new_forwarding_entry);
- ccn_charbuf_destroy(&signed_info);
- ccn_charbuf_destroy(&temp);
- ccn_charbuf_destroy(&resultbuf);
+ if ( signed_info )
+ ccn_charbuf_destroy(&signed_info);
+ if ( temp )
+ ccn_charbuf_destroy(&temp);
+ if ( resultbuf )
+ ccn_charbuf_destroy(&resultbuf);
ccn_charbuf_destroy(&name);
- ccn_charbuf_destroy(&prefixreg);
+ if ( prefixreg )
+ ccn_charbuf_destroy(&prefixreg);
return -1;
}
diff --git a/nlsr_sync.c b/nlsr_sync.c
index c673259..53effdd 100644
--- a/nlsr_sync.c
+++ b/nlsr_sync.c
@@ -655,7 +655,7 @@
return 0;
}
- struct ccn_charbuf *
+struct ccn_charbuf *
make_template(int scope)
{
struct ccn_charbuf *templ = NULL;
diff --git a/nlsr_sync.h b/nlsr_sync.h
index ad6cd8e..860489c 100644
--- a/nlsr_sync.h
+++ b/nlsr_sync.h
@@ -1,6 +1,7 @@
#ifndef _NLSR_SYNC_H_
#define _NLSR_SYNC_H_
+struct ccn_charbuf * make_template(int scope);
int sync_monitor(char *topo_prefix, char *slice_prefix);
int write_data_to_repo(char *data,char *name_prefix);
int create_sync_slice(char *topo_prefix, char *slice_prefix);