Free the session in duplicateprofile
authorMatthieu Patou <mat@matws.net>
Mon, 19 Mar 2012 19:10:22 +0000 (19:10 +0000)
committerMatthieu Patou <mat@matws.net>
Mon, 19 Mar 2012 19:10:22 +0000 (19:10 +0000)
libmapi/IProfAdmin.c

index b651ebae559ee957cc09309eb47e1a6e6717ce04..75dfc6b9e646872134024ffe168655fa6b799433 100644 (file)
@@ -1139,6 +1139,8 @@ _PUBLIC_ enum MAPISTATUS DuplicateProfile(struct mapi_context *mapi_ctx,
                set_profile_attribute(mapi_ctx, profile_dst, *SRowSet, index, PR_EMAIL_ADDRESS, "EmailAddress");
                mapi_profile_delete_string_attr(mapi_ctx, profile_dst, "EmailAddress", oldEmailAddress);
                MAPIFreeBuffer(SRowSet);
+               DLIST_REMOVE(mapi_ctx->session, session);
+               MAPIFreeBuffer(session);
        }
 
        /* Change ProxyAddress */