mirror of
https://github.com/redis/redis.git
synced 2026-06-09 00:33:08 -04:00
Fix genClusterDebugString minor sds leaks (#12739)
This function now will only be called in printCrashReport, so this is just a cleanup.
This commit is contained in:
parent
0ffb9d2ea9
commit
53294e537c
1 changed files with 9 additions and 3 deletions
12
src/debug.c
12
src/debug.c
|
|
@ -1972,11 +1972,17 @@ void logStackTrace(void *eip, int uplevel) {
|
|||
#endif /* HAVE_BACKTRACE */
|
||||
|
||||
sds genClusterDebugString(sds infostring) {
|
||||
sds cluster_info = genClusterInfoString();
|
||||
sds cluster_nodes = clusterGenNodesDescription(NULL, 0, 0);
|
||||
|
||||
infostring = sdscatprintf(infostring, "\r\n# Cluster info\r\n");
|
||||
infostring = sdscatsds(infostring, genClusterInfoString());
|
||||
infostring = sdscatsds(infostring, cluster_info);
|
||||
infostring = sdscatprintf(infostring, "\n------ CLUSTER NODES OUTPUT ------\n");
|
||||
infostring = sdscatsds(infostring, clusterGenNodesDescription(NULL, 0, 0));
|
||||
|
||||
infostring = sdscatsds(infostring, cluster_nodes);
|
||||
|
||||
sdsfree(cluster_info);
|
||||
sdsfree(cluster_nodes);
|
||||
|
||||
return infostring;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue