osip-dev
[Top][All Lists]
Advanced

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

Re: [osip-dev] improvements in _eXosip_build_request_within_dialog


From: Aymeric Moizard
Subject: Re: [osip-dev] improvements in _eXosip_build_request_within_dialog
Date: Thu, 20 Oct 2016 18:24:58 +0200

Hi again!

Tks again for the report. commited and pushed in the git.

Keep up checking!
Aymeric

2016-10-20 12:45 GMT+02:00 FEICHTER Christoph <address@hidden>:

hi aymeric,

 

I found some more missing frees:

(function _eXosip_build_request_within_dialog, line 737ff)

although it would only very rarely happen to hit these if-branches.

 

int

_eXosip_build_request_within_dialog (struct eXosip_t *excontext, osip_message_t ** dest, const char *method, osip_dialog_t * dialog, const char *transport)

{

  ...

 

    i = osip_cseq_init (&cseq);

    if (i != 0) {

      osip_message_free (request);

      return i;

    }

    tmp = osip_malloc (20);

    if (tmp == NULL) {

      osip_message_free (request);

      osip_cseq_free (cseq);

      return OSIP_NOMEM;

    }

    sprintf (tmp, "%i", dialog->local_cseq);

    osip_cseq_set_number (cseq, tmp);

    osip_cseq_set_method (cseq, osip_strdup (method));

    request->cseq = cseq;

  }

  else {

    osip_cseq_t *cseq;

    char *tmp;

 

    i = osip_cseq_init (&cseq);

    if (i != 0) {

      osip_message_free (request);

      return i;

    }

    dialog->local_cseq++;       /* we should we do that?? */

    tmp = osip_malloc (20);

    if (tmp == NULL) {

      osip_message_free (request);

      osip_cseq_free (cseq);

      return OSIP_NOMEM;

    }

    snprintf (tmp, 20, "%i", dialog->local_cseq);

    osip_cseq_set_number (cseq, tmp);

    osip_cseq_set_method (cseq, osip_strdup (method));

    request->cseq = cseq;

  }

 

br,

Christoph

 




--
Antisip - http://www.antisip.com

reply via email to

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