Kaydet (Commit) f6141d88 authored tarafından José Guilherme Vanz's avatar José Guilherme Vanz Kaydeden (comit) Caolán McNamara

fdo#71043 - Use STACK lint tool to clean code

The code is using a pointer without check if it is not null.

Change-Id: Icb2dcf8d41a35514e18a5881f59399951b3e0493
Reviewed-on: https://gerrit.libreoffice.org/6529Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 8792ec7b
......@@ -98,6 +98,8 @@ oslPipe __osl_createPipeImpl()
oslPipe pPipeImpl;
pPipeImpl = (oslPipe)calloc(1, sizeof(struct oslPipeImpl));
if (pPipeImpl == NULL)
return NULL;
pPipeImpl->m_nRefCount =1;
pPipeImpl->m_bClosed = sal_False;
#if defined(LINUX)
......@@ -230,7 +232,13 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
}
/* alloc memory */
pPipe= __osl_createPipeImpl();
pPipe = __osl_createPipeImpl();
if (pPipe == NULL)
{
OSL_TRACE("__osl_createPipe socket failed");
return NULL;
}
/* create socket */
pPipe->m_Socket = socket(AF_UNIX, SOCK_STREAM, 0);
......@@ -467,7 +475,7 @@ oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe)
else
{
/* alloc memory */
pAcceptedPipe= __osl_createPipeImpl();
pAcceptedPipe = __osl_createPipeImpl();
OSL_ASSERT(pAcceptedPipe);
if(pAcceptedPipe==NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment