소스 검색

mi_rpc: don't access fields in structure after free in mi_rpc_async_close()

Daniel-Constantin Mierla 11 년 전
부모
커밋
f619a813ef
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      modules/mi_rpc/mi_rpc_mod.c

+ 1 - 1
modules/mi_rpc/mi_rpc_mod.c

@@ -323,8 +323,8 @@ static void mi_rpc_async_close(struct mi_root* mi_rpl,
 		if (dctx==0){
 			BUG("null dctx\n");
 			shm_free(mi_h->param);
-			shm_free(mi_h);
 			mi_h->param=0;
+			shm_free(mi_h);
 			goto error;
 		}
 		mode=((struct mi_rpc_handler_param*)mi_h->param)->mode;