Issue-ID: RIC-858
Signed-off-by: czichy <thoralf.czichy@nokia.com>
Change-Id: I67eabcf7249baa1b0b191f2ee47be94c1857a58a
return rc;
}
+/*
+ Frees the string that was allocated and returned using rmr_get_consts()
+*/
+extern void rmr_free_consts( char* p) {
+ free(p);
+}
+
/*
Returns a set of json with the constants which are set in the header.
+ Caller must free the returned string using rmr_free_consts()
*/
extern char* rmr_get_consts( ) {
int remain; // bytes remaining in wbuf
errors += fail_if_true( *b != '{', "first character in buffer not valid json" );
len = strlen( b ) - 1;
errors += fail_if_true( *(b+len) != '}', "last character in buffer not valid json" );
- free( b );
+ rmr_free_consts( b );
b = build_sval( "foobar", "value", 1 );
errors += fail_if_equal( strlen( b ), 0, "build svalue with sep returned nil buffer" );