[ovs-dev] [PATCH 1/1] ovsdb-client: fix memory leak in do_needs_conversion() and do_convert()

Ben Pfaff blp at ovn.org
Mon Sep 30 20:42:05 UTC 2019


On Mon, Sep 30, 2019 at 10:21:00AM +0200, Damijan Skvarc wrote:
> Memory leak itself is not so important, however the problem is that
> it is caused by forgetting to close rpc channel which might in
> a long term lead to the leak of system resources.
> 
> Memory leak is reported by Valgrin running test suite and is expressed as:

Thanks for the fix.

I don't understand why this is necessary.  These functions are called
from main(), which closes the rpc connection just afterward:

    command->handler(rpc, database, argc - optind, argv + optind);

    free(database);
    jsonrpc_close(rpc);

Can you take a closer look?


More information about the dev mailing list