speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WARNING possible mem leaks in libspeechd?


From: Luke Yelavich
Subject: WARNING possible mem leaks in libspeechd?
Date: Thu, 13 Aug 2009 08:51:34 +1000

On Thu, Aug 13, 2009 at 04:25:12AM EST, Halim Sahin wrote:
> Hi,
> Please help to solve this:
> My testcase:

What if you were to compile your test against libspeechd properly? I.e don't 
dlopen the library, but include libspeechd.h, and link it with gcc? Something 
similar to this:

test-client.c:
#include<stdio.h>
#include <libspeechd.h>

int main ()
{
        SPDConnection *speechd_connection;

        speechd_connection = spd_open("Test client", "Test client connection", 
"tester", SPD_MODE_SINGLE);
        if (speechd_connection == NULL)
        {
                fprintf(stderr, "Unable to make a connection with 
speech-dispatcher.\n");
                return 1;
        }
        printf("Connection with speech-dispatcher made successfully.\n");
        spd_close(speechd_connection);
        return 0;
}

Then compile with: gcc -o test-client test-client.c -lspeechd

In addition, there are some memory leak fixes to libspeechd that are not yet in 
a release tarball. If you were to use the latest speech-dispatcher git or cvs, 
you may find that the memory leak yu found is gone.

Luke



reply via email to

[Prev in Thread] Current Thread [Next in Thread]