Code Review
/
ric-plt
/
lib
/
rmr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fixing memory leak in python support function
[ric-plt/lib/rmr.git]
/
src
/
rmr
/
common
/
src
/
wrapper.c
diff --git
a/src/rmr/common/src/wrapper.c
b/src/rmr/common/src/wrapper.c
index
9d3dd72
..
63f5d8a
100644
(file)
--- a/
src/rmr/common/src/wrapper.c
+++ b/
src/rmr/common/src/wrapper.c
@@
-84,8
+84,16
@@
static int bang_on( char* target, char* src, int max ) {
return rc;
}
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.
/*
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
*/
extern char* rmr_get_consts( ) {
int remain; // bytes remaining in wbuf