소스 검색

Fix another memory leak case in sandbox.c:prot_strings()

This is related to the rest of 523587a5cf62119baa01822e2e783925726a790b
Nick Mathewson 11 년 전
부모
커밋
72ba1739e2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/common/sandbox.c

+ 1 - 1
src/common/sandbox.c

@@ -1076,7 +1076,7 @@ prot_strings(scmp_filter_ctx ctx, sandbox_cfg_t* cfg)
       SCMP_CMP(0, SCMP_CMP_EQ, (intptr_t) pr_mem_base));
       SCMP_CMP(0, SCMP_CMP_EQ, (intptr_t) pr_mem_base));
   if (ret) {
   if (ret) {
     log_err(LD_BUG,"(Sandbox) mremap protected memory filter fail!");
     log_err(LD_BUG,"(Sandbox) mremap protected memory filter fail!");
-    return ret;
+    goto out;
   }
   }
 
 
   // no munmap of the protected base address
   // no munmap of the protected base address