Skip to content

Commit

Permalink
Coverity: dup() returns -1 on error, not NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
jpopelka committed Apr 28, 2011
1 parent 264e42f commit 0414506
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cupsppd.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ PPD_writeFd (PPD *self, PyObject *args)
return NULL;

dfd = dup (fd);
if (!dfd) {
if (dfd == -1) {
PyErr_SetFromErrno (PyExc_RuntimeError);
return NULL;
}
Expand Down

0 comments on commit 0414506

Please sign in to comment.