瀏覽代碼

janssonrpc-c: fix shared memory leak on notification requests

Emmanuel Schmidbauer 9 年之前
父節點
當前提交
cf8d6066af
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      modules/janssonrpc-c/janssonrpc_io.c

+ 2 - 0
modules/janssonrpc-c/janssonrpc_io.c

@@ -534,6 +534,8 @@ void cmd_pipe_cb(int fd, short event, void *arg)
 		WARN("%s could not be sent to connection group: %.*s\n",
 				type, STR(req_cmd->conn));
 		fail_request(JRPC_ERR_SEND, req, "Failed to send request");
+	} else if (req_cmd->notify_only == true) { // free notification requests if they are sent
+		free_req_cmd(req_cmd);
 	}
 
 end: