소스 검색

totemconfig: Fix logging of freed string

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse 7 년 전
부모
커밋
bd338449ac
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      exec/totemconfig.c

+ 2 - 2
exec/totemconfig.c

@@ -1237,9 +1237,9 @@ static void put_nodelist_members_to_config(struct totem_config *totem_config, in
 				snprintf(tmp_key, ICMAP_KEYNAME_MAXLEN, "nodelist.node.%u.ring0_addr", node_pos);
 				if (icmap_get_string(tmp_key, &str) == CS_OK) {
 					nodeid = generate_nodeid(totem_config, str);
-					free(str);
 					log_printf(LOGSYS_LEVEL_DEBUG,
-						   "Generated nodeid = 0x%x for %s\n", nodeid, str);
+						   "Generated nodeid = 0x%x for %s", nodeid, str);
+					free(str);
 				}
 			}