@@ -534,11 +534,11 @@ int JSONSet_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc
534
534
535
535
// Create object from json
536
536
Object * jo = NULL ;
537
- sds jerr = NULL ;
537
+ char * jerr = NULL ;
538
538
if (JSONOBJECT_OK != CreateNodeFromJSON (json , jsonlen , & jo , & jerr )) {
539
539
if (jerr ) {
540
540
RedisModule_ReplyWithError (ctx , jerr );
541
- sdsfree (jerr );
541
+ RedisModule_Free (jerr );
542
542
} else {
543
543
RM_LOG_WARNING (ctx , "%s" , REJSON_ERROR_JSONOBJECT_ERROR );
544
544
RedisModule_ReplyWithError (ctx , REJSON_ERROR_JSONOBJECT_ERROR );
@@ -1027,11 +1027,11 @@ int JSONNum_GenericCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int ar
1027
1027
// we use the json parser to convert the bval arg into a value to catch all of JSON's syntices
1028
1028
size_t vallen ;
1029
1029
const char * val = RedisModule_StringPtrLen (argv [(4 == argc ? 3 : 2 )], & vallen );
1030
- sds jerr = NULL ;
1030
+ char * jerr = NULL ;
1031
1031
if (JSONOBJECT_OK != CreateNodeFromJSON (val , vallen , & joval , & jerr )) {
1032
1032
if (jerr ) {
1033
1033
RedisModule_ReplyWithError (ctx , jerr );
1034
- sdsfree (jerr );
1034
+ RedisModule_Free (jerr );
1035
1035
} else {
1036
1036
RM_LOG_WARNING (ctx , "%s" , REJSON_ERROR_JSONOBJECT_ERROR );
1037
1037
RedisModule_ReplyWithError (ctx , REJSON_ERROR_JSONOBJECT_ERROR );
@@ -1165,11 +1165,11 @@ int JSONStrAppend_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, in
1165
1165
1166
1166
// make an object from the JSON value
1167
1167
Object * jo = NULL ;
1168
- sds jerr = NULL ;
1168
+ char * jerr = NULL ;
1169
1169
if (JSONOBJECT_OK != CreateNodeFromJSON (json , jsonlen , & jo , & jerr )) {
1170
1170
if (jerr ) {
1171
1171
RedisModule_ReplyWithError (ctx , jerr );
1172
- sdsfree (jerr );
1172
+ RedisModule_Free (jerr );
1173
1173
} else {
1174
1174
RM_LOG_WARNING (ctx , "%s" , REJSON_ERROR_JSONOBJECT_ERROR );
1175
1175
RedisModule_ReplyWithError (ctx , REJSON_ERROR_JSONOBJECT_ERROR );
@@ -1272,12 +1272,12 @@ int JSONArrInsert_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, in
1272
1272
1273
1273
// create object from json
1274
1274
Object * jo = NULL ;
1275
- sds jerr = NULL ;
1275
+ char * jerr = NULL ;
1276
1276
if (JSONOBJECT_OK != CreateNodeFromJSON (json , jsonlen , & jo , & jerr )) {
1277
1277
Node_Free (sub );
1278
1278
if (jerr ) {
1279
1279
RedisModule_ReplyWithError (ctx , jerr );
1280
- sdsfree (jerr );
1280
+ RedisModule_Free (jerr );
1281
1281
} else {
1282
1282
RM_LOG_WARNING (ctx , "%s" , REJSON_ERROR_JSONOBJECT_ERROR );
1283
1283
RedisModule_ReplyWithError (ctx , REJSON_ERROR_JSONOBJECT_ERROR );
@@ -1367,12 +1367,12 @@ int JSONArrAppend_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, in
1367
1367
1368
1368
// create object from json
1369
1369
Object * jo = NULL ;
1370
- sds jerr = NULL ;
1370
+ char * jerr = NULL ;
1371
1371
if (JSONOBJECT_OK != CreateNodeFromJSON (json , jsonlen , & jo , & jerr )) {
1372
1372
Node_Free (sub );
1373
1373
if (jerr ) {
1374
1374
RedisModule_ReplyWithError (ctx , jerr );
1375
- sdsfree (jerr );
1375
+ RedisModule_Free (jerr );
1376
1376
} else {
1377
1377
RM_LOG_WARNING (ctx , "%s" , REJSON_ERROR_JSONOBJECT_ERROR );
1378
1378
RedisModule_ReplyWithError (ctx , REJSON_ERROR_JSONOBJECT_ERROR );
@@ -1466,11 +1466,11 @@ int JSONArrIndex_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int
1466
1466
1467
1467
// create an object from json
1468
1468
Object * jo = NULL ;
1469
- sds jerr = NULL ;
1469
+ char * jerr = NULL ;
1470
1470
if (JSONOBJECT_OK != CreateNodeFromJSON (json , jsonlen , & jo , & jerr )) {
1471
1471
if (jerr ) {
1472
1472
RedisModule_ReplyWithError (ctx , jerr );
1473
- sdsfree (jerr );
1473
+ RedisModule_Free (jerr );
1474
1474
} else {
1475
1475
RM_LOG_WARNING (ctx , "%s" , REJSON_ERROR_JSONOBJECT_ERROR );
1476
1476
RedisModule_ReplyWithError (ctx , REJSON_ERROR_JSONOBJECT_ERROR );
0 commit comments