Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:GA
openwsman.1064
0002-wsmc_create-error-out-if-calloc-fails.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-wsmc_create-error-out-if-calloc-fails.patch of Package openwsman.1064
From 84d485c98897e47729aa966808f8379612df637c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de> Date: Tue, 25 Aug 2015 12:16:51 +0200 Subject: [PATCH 2/6] wsmc_create: error out if calloc fails --- src/lib/wsman-client.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/wsman-client.c b/src/lib/wsman-client.c index 6f4bb5f849db..859aefddbbd8 100644 --- a/src/lib/wsman-client.c +++ b/src/lib/wsman-client.c @@ -1989,6 +1989,10 @@ wsmc_create(const char *hostname, const char *password) { WsManClient *wsc = (WsManClient *) calloc(1, sizeof(WsManClient)); + if (wsc == NULL) { + error("Can't alloc WsManClient"); + return NULL; + } wsc->hdl = &wsc->data; if (pthread_mutex_init(&wsc->mutex, NULL)) { -- 2.1.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor