Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
openwsman
0008-wsmc_create-error-out-if-calloc-fails.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0008-wsmc_create-error-out-if-calloc-fails.patch of Package openwsman
From df12853852b9b0fd2b379eca60e34ff6b45d3339 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 08/15] 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 b958279452ff..88ad07c54644 100644 --- a/src/lib/wsman-client.c +++ b/src/lib/wsman-client.c @@ -1988,6 +1988,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.18.0
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