commit | 0a3ea7322a30be0b1100e5ba871a335b5728b744 | [log] [tgz] |
---|---|---|
author | Klaus Kämpf <kkaempf@suse.de> | Tue Aug 25 12:16:51 2015 +0200 |
committer | Klaus Kämpf <kkaempf@suse.de> | Thu Aug 27 12:03:58 2015 +0200 |
tree | 054730ac1c84174d611a849061110fbb524e14cb | |
parent | 9ec439aa18efa48cce3eaa999f9b9742795ee60b [diff] |
wsmc_create: error out if calloc fails
diff --git a/src/lib/wsman-client.c b/src/lib/wsman-client.c index 01ac7ef..a82a65e 100644 --- a/src/lib/wsman-client.c +++ b/src/lib/wsman-client.c
@@ -1986,6 +1986,10 @@ 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)) {