aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-command.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-06-01 04:14:00 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-06-01 04:14:00 +0800
commit4b63089bda38776bf4aa20dc97e6db41823a061c (patch)
tree1fde7a92531e4fb0bb09f2c2268966c39dfb20f2 /camel/providers/imap/camel-imap-command.c
parent60a6173744071e0eeacd73cfcba029fa593e81ac (diff)
downloadgsoc2013-evolution-4b63089bda38776bf4aa20dc97e6db41823a061c.tar
gsoc2013-evolution-4b63089bda38776bf4aa20dc97e6db41823a061c.tar.gz
gsoc2013-evolution-4b63089bda38776bf4aa20dc97e6db41823a061c.tar.bz2
gsoc2013-evolution-4b63089bda38776bf4aa20dc97e6db41823a061c.tar.lz
gsoc2013-evolution-4b63089bda38776bf4aa20dc97e6db41823a061c.tar.xz
gsoc2013-evolution-4b63089bda38776bf4aa20dc97e6db41823a061c.tar.zst
gsoc2013-evolution-4b63089bda38776bf4aa20dc97e6db41823a061c.zip
Revert my fix from the other day since camel_imap_command_response()
2002-05-31 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_rescan): Revert my fix from the other day since camel_imap_command_response() doesn't guarentee that resp will be set to NULL on error. * providers/imap/camel-imap-command.c (camel_imap_command_response): Use a different variable to get the return of imap_parse_untagged so that we don't lose the pointer to the original malloc'd respbuf buffer. svn path=/trunk/; revision=17061
Diffstat (limited to 'camel/providers/imap/camel-imap-command.c')
-rw-r--r--camel/providers/imap/camel-imap-command.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c
index 4309e18ddd..82ddf26ce7 100644
--- a/camel/providers/imap/camel-imap-command.c
+++ b/camel/providers/imap/camel-imap-command.c
@@ -288,7 +288,7 @@ camel_imap_command_response (CamelImapStore *store, char **response,
CamelException *ex)
{
CamelImapResponseType type;
- char *respbuf;
+ char *respbuf, *untagged;
if (camel_imap_store_readline (store, &respbuf, ex) < 0) {
CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
@@ -312,9 +312,12 @@ camel_imap_command_response (CamelImapStore *store, char **response,
/* Read the rest of the response. */
type = CAMEL_IMAP_RESPONSE_UNTAGGED;
- respbuf = imap_read_untagged (store, respbuf, ex);
- if (!respbuf)
+ untagged = imap_read_untagged (store, respbuf, ex);
+ if (!untagged) {
type = CAMEL_IMAP_RESPONSE_ERROR;
+ g_free (respbuf);
+ respbuf = NULL;
+ }
break;
case '+':