View | Details | Raw Unified | Return to bug 15401
Collapse All | Expand All

(-)src/klamd/scanner.c.orig (-2 / +2 lines)
Lines 396-408 int scanstream(int odesc, unsigned long Link Here
396
396
397
    logg("*Accepted connection on port %d, fd %d\n", port, acceptd);
397
    logg("*Accepted connection on port %d, fd %d\n", port, acceptd);
398
398
399
    if ((tmpname = cli_gentempdesc(NULL, &tmpd)) == NULL) {
399
    if ((ret = cli_gentempfd(NULL, &tmpname, &tmpd) )) {
400
	shutdown(sockfd, 2);
400
	shutdown(sockfd, 2);
401
	close(sockfd);
401
	close(sockfd);
402
	close(acceptd);
402
	close(acceptd);
403
	mdprintf(odesc, "tempfile() failed. ERROR\n");
403
	mdprintf(odesc, "tempfile() failed. ERROR\n");
404
	logg("!ScanStream %d: Can't create temporary file.\n", port);
404
	logg("!ScanStream %d: Can't create temporary file.\n", port);
405
	return -1;
405
	return ret;
406
    }
406
    }
407
407
408
    maxsize = cfgopt(copt, "StreamMaxLength")->numarg;
408
    maxsize = cfgopt(copt, "StreamMaxLength")->numarg;

Return to bug 15401