소스 검색

ucode-mod-pkgen: fix refcounting issue

Do not call ucv_get if the reference is transferred without being used
elsewhere

Signed-off-by: Felix Fietkau <[email protected]>
Felix Fietkau 9 달 전
부모
커밋
4d4e631267
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      package/utils/ucode-mod-pkgen/src/ucode.c

+ 1 - 1
package/utils/ucode-mod-pkgen/src/ucode.c

@@ -269,7 +269,7 @@ uc_cert_info(uc_vm_t *vm, size_t nargs)
 		uc_value_t *info = ucv_object_new(vm);
 		int len;
 
-		ucv_array_push(ret, ucv_get(info));
+		ucv_array_push(ret, info);
 		ucv_object_add(info, "version", ucv_int64_new(cur->version));
 
 		uc_cert_info_add_name(info, "issuer", &cur->issuer);