]> code.citadel.org Git - citadel.git/blobdiff - webcit/vcard_edit.c
* fix various leaks
[citadel.git] / webcit / vcard_edit.c
index 31780a6a136a2507be84e71501d558bb38df2482..a0c1795ba9162bcfe67d2fa5352346b03cdaf713 100644 (file)
@@ -119,6 +119,7 @@ wc_mime_attachment *load_vcard(message_summary *Msg)
 
        load_message(Msg, FoundCharset, &Error);
 
+       FreeStrBuf(&FoundCharset);
        /* look up the vcard... */
        it = GetNewHashPos(Msg->AllAttach, 0);
        while (GetNextHashPos(Msg->AllAttach, it, &len, &Key, &vMime) && 
@@ -1218,7 +1219,7 @@ void display_vcard_photo_img(void)
        const char *contentType;
        wcsession *WCC = WC;
 
-       msgnum = StrBufExtract_long(WCC->Hdr->ReqLine, 2, '/');
+       msgnum = StrBufExtract_long(WCC->Hdr->ReqLine, 0, '/');
        
        vcard = load_mimepart(msgnum,"1");
        v = VCardLoad(vcard);