Ticket #295: 0001-Fix-memory-leak-in-tests.patch

File 0001-Fix-memory-leak-in-tests.patch, 771 bytes (added by Alexey Shmalko <rasen.dubi@…>, 15 months ago)

Patch to fix memory leak

  • tests/test-reader.c

    From c0c82b64b822fa4e6d0d5e062486f3f3b7897bc2 Mon Sep 17 00:00:00 2001
    From: Alexey Shmalko <rasen.dubi@gmail.com>
    Date: Tue, 10 Sep 2013 19:28:09 +0300
    Subject: [PATCH] Fix memory leak in tests
    
    ---
     tests/test-reader.c | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/tests/test-reader.c b/tests/test-reader.c
    index c6f84cd..8f780b7 100644
    a b int check_utf8_sequences(void) 
    152152                            parser.problem, parser.problem_offset); 
    153153                } 
    154154            } 
     155            yaml_parser_delete(&parser); 
    155156            if (*end == '!') break; 
    156157            start = ++end; 
    157             yaml_parser_delete(&parser); 
    158158        }; 
    159159        printf("\n"); 
    160160    }