Commit 813dfbb8 authored by deuce's avatar deuce
Browse files

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

parent 19589bb9
......@@ -260,9 +260,12 @@ int DLLCALL recvfilesocket(int sock, int file, off_t *offset, off_t count)
return(-1);
}
if(offset!=NULL)
if(lseek(file,*offset,SEEK_SET)<0)
if(offset!=NULL) {
if(lseek(file,*offset,SEEK_SET)<0) {
free(buf);
return(-1);
}
}
rd=read(sock,buf,(size_t)count);
if(rd!=count) {
......
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