[Epic-ID: ODUHIGH-475][Task-ID: ODUHIGH-476]F1AP codec update
[o-du/l2.git] / src / codec_utils / common / asn_internal.c
old mode 100755 (executable)
new mode 100644 (file)
index 1aff95f..004660b
@@ -26,11 +26,12 @@ asn__format_to_callback(int (*cb)(const void *, size_t, void *key), void *key,
         buf_size <<= 1;
         if(buf == scratch) {
             buf = MALLOC(buf_size);
-            if(!buf) return -1;
+            if(!buf) { va_end(args); return -1; }
         } else {
             void *p = REALLOC(buf, buf_size);
             if(!p) {
                 FREEMEM(buf);
+               va_end(args);
                 return -1;
             }
             buf = p;