Eliminate a crash and plug a leak in the error path for function

nssSMIMEProfile_Create. Coverity bug 337101. r=alexei.volkov.
This commit is contained in:
nelson%bolyard.com 2006-05-18 23:29:19 +00:00
Родитель 9ccdd4236a
Коммит 505671ed77
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -35,7 +35,7 @@
* ***** END LICENSE BLOCK ***** */
#ifdef DEBUG
static const char CVS_ID[] = "@(#) $RCSfile: certificate.c,v $ $Revision: 1.57 $ $Date: 2006/04/07 05:49:04 $";
static const char CVS_ID[] = "@(#) $RCSfile: certificate.c,v $ $Revision: 1.58 $ $Date: 2006/05/18 23:29:19 $";
#endif /* DEBUG */
#ifndef NSSPKI_H
@ -930,7 +930,8 @@ nssSMIMEProfile_Create (
}
return rvProfile;
loser:
nssPKIObject_Destroy(object);
if (object) nssPKIObject_Destroy(object);
else if (arena) nssArena_Destroy(arena);
return (nssSMIMEProfile *)NULL;
}