Skip to content
Snippets Groups Projects
Commit 813dfbb8 authored by deuce's avatar deuce
Browse files

Coverity: Unlikely memory leak in unused recvfilesocket() function.

parent 19589bb9
No related branches found
No related tags found
No related merge requests found
...@@ -260,9 +260,12 @@ int DLLCALL recvfilesocket(int sock, int file, off_t *offset, off_t count) ...@@ -260,9 +260,12 @@ int DLLCALL recvfilesocket(int sock, int file, off_t *offset, off_t count)
return(-1); return(-1);
} }
if(offset!=NULL) if(offset!=NULL) {
if(lseek(file,*offset,SEEK_SET)<0) if(lseek(file,*offset,SEEK_SET)<0) {
free(buf);
return(-1); return(-1);
}
}
rd=read(sock,buf,(size_t)count); rd=read(sock,buf,(size_t)count);
if(rd!=count) { if(rd!=count) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment