Skip to content
  • Christian Kellner's avatar
    test: journal: don't 'exit' but return from fork · b49a45ec
    Christian Kellner authored
    In the /journal/object test, a subprocess is created and at the
    end of the child process' code an exit call was made to end it.
    For some reason (not sure why) that would generate a leak warning
    for the child (generating a negative exit code), making the main
    test fail at "g_test_trap_assert_passed". Now instead we simply
    return in the child.
    
    Child leak warning when using 'exit()':
    
    ==18507==ERROR: LeakSanitizer: detected memory leaks
    
    Direct leak of 32 byte(s) in 1 object(s) allocated from:
        #0 0x7f9b8cccbc88 in realloc (/lib64/libasan.so.5+0xefc88)
        #1 0x7f9b8cb1105d in g_realloc (/lib64/libglib-2.0.so.0+0x5405d)
    b49a45ec