Merge pull request #3724 from chipitsine/master
make cppcheck a bit happier
This commit is contained in:
commit
c966f71e9b
@ -100,6 +100,7 @@ static UINT printer_cups_write_printjob(rdpPrintJob* printjob, BYTE* data, int s
|
|||||||
|
|
||||||
if (fwrite(data, 1, size, fp) < size)
|
if (fwrite(data, 1, size, fp) < size)
|
||||||
{
|
{
|
||||||
|
fclose(fp);
|
||||||
return ERROR_INTERNAL_ERROR;
|
return ERROR_INTERNAL_ERROR;
|
||||||
// FIXME once this function doesn't return void anymore!
|
// FIXME once this function doesn't return void anymore!
|
||||||
}
|
}
|
||||||
|
@ -192,7 +192,10 @@ mfEventQueue* mf_event_queue_new()
|
|||||||
event_queue->events = (mfEvent**) malloc(sizeof(mfEvent*) * event_queue->size);
|
event_queue->events = (mfEvent**) malloc(sizeof(mfEvent*) * event_queue->size);
|
||||||
|
|
||||||
if (pipe(event_queue->pipe_fd) < 0)
|
if (pipe(event_queue->pipe_fd) < 0)
|
||||||
|
{
|
||||||
|
free(event_queue);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
pthread_mutex_init(&(event_queue->mutex), NULL);
|
pthread_mutex_init(&(event_queue->mutex), NULL);
|
||||||
}
|
}
|
||||||
|
@ -230,7 +230,10 @@ rdpShadowCapture* shadow_capture_new(rdpShadowServer* server)
|
|||||||
capture->server = server;
|
capture->server = server;
|
||||||
|
|
||||||
if (!InitializeCriticalSectionAndSpinCount(&(capture->lock), 4000))
|
if (!InitializeCriticalSectionAndSpinCount(&(capture->lock), 4000))
|
||||||
|
{
|
||||||
|
free(capture);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return capture;
|
return capture;
|
||||||
}
|
}
|
||||||
|
@ -437,6 +437,7 @@ static void* schannel_test_server_thread(void* arg)
|
|||||||
if (!(lpTokenOut = (BYTE*) malloc(cbMaxToken)))
|
if (!(lpTokenOut = (BYTE*) malloc(cbMaxToken)))
|
||||||
{
|
{
|
||||||
printf("Memory allocation failed\n");
|
printf("Memory allocation failed\n");
|
||||||
|
free(lpTokenIn);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
fContextReq = ASC_REQ_STREAM |
|
fContextReq = ASC_REQ_STREAM |
|
||||||
|
@ -195,7 +195,10 @@ LPSTR* CommandLineToArgvA(LPCSTR lpCmdLine, int* pNumArgs)
|
|||||||
buffer = (char*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, maxBufferSize);
|
buffer = (char*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, maxBufferSize);
|
||||||
|
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
|
{
|
||||||
|
free(lpEscapedChars);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
pArgs = (LPSTR*) buffer;
|
pArgs = (LPSTR*) buffer;
|
||||||
pOutput = (char*) &buffer[maxNumArgs * (sizeof(char*))];
|
pOutput = (char*) &buffer[maxNumArgs * (sizeof(char*))];
|
||||||
|
@ -309,7 +309,10 @@ WINPR_SAM_ENTRY* SamLookupUserW(WINPR_SAM* sam, LPWSTR User, UINT32 UserLength,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!SamLookupStart(sam))
|
if (!SamLookupStart(sam))
|
||||||
|
{
|
||||||
|
free(entry);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
while (sam->line != NULL)
|
while (sam->line != NULL)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user