Module: kamailio Branch: master Commit: dadd54a46f81ef05478e622a89a3bb739907cade URL: https://github.com/kamailio/kamailio/commit/dadd54a46f81ef05478e622a89a3bb739907cade
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2017-07-20T09:31:49+02:00 xmpp: close fd in case of write error --- Modified: src/modules/xmpp/xode_from.c --- Diff: https://github.com/kamailio/kamailio/commit/dadd54a46f81ef05478e622a89a3bb739907cade.diff Patch: https://github.com/kamailio/kamailio/commit/dadd54a46f81ef05478e622a89a3bb739907cade.patch --- diff --git a/src/modules/xmpp/xode_from.c b/src/modules/xmpp/xode_from.c index f2d9b54569..8a78f4ba4d 100644 --- a/src/modules/xmpp/xode_from.c +++ b/src/modules/xmpp/xode_from.c @@ -225,8 +225,10 @@ int xode_to_file(char *file, xode node) doc = xode_to_str(node); i = write(fd,doc,strlen(doc)); - if(i < 0) + if(i < 0) { + close(fd); return -1; + } close(fd); return 1; _______________________________________________ Kamailio (SER) - Development Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
