summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2019-03-28 14:42:16 +0100
committerJakub Jelen <jjelen@redhat.com>2019-07-04 14:52:38 +0200
commit1f9728ee3bdae99517d3a4072290e3451c329382 (patch)
treefbf5a99d1b32c413cb23608ab5f6f95db2ac0262 /src
parent5c0afa832c2e03388b0f3df14a74a5d1f825d69b (diff)
cac: No need to check for errors from g_new0()
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/cac.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/cac.c b/src/cac.c
index 67b8e69..c89c018 100644
--- a/src/cac.c
+++ b/src/cac.c
@@ -1895,8 +1895,6 @@ cac_new_aca_applet_private(int cert_count)
/* Create the private data structure */
applet_private = g_new0(VCardAppletPrivate, 1);
aca_applet_data = &(applet_private->u.aca_data);
- if (applet_private == NULL)
- goto failure;
/* store the applet OID */
applet_private->coids = g_malloc(sizeof(struct coid));
@@ -1912,12 +1910,6 @@ cac_new_aca_applet_private(int cert_count)
aca_applet_data->pki_applets = cert_count;
return applet_private;
-
-failure:
- if (applet_private != NULL) {
- cac_delete_aca_applet_private(applet_private);
- }
- return NULL;
}
static VCardAppletPrivate *
@@ -1988,8 +1980,6 @@ cac_new_empty_applet_private(unsigned char objects[][2], unsigned int objects_le
/* Create the private data structure */
applet_private = g_new0(VCardAppletPrivate, 1);
- if (applet_private == NULL)
- goto failure;
/* Create Object ID list */
applet_private->coids = g_malloc_n(objects_len, sizeof(struct coid));