Skip to content

Commit 80d76cf

Browse files
committed
Don't need to guard against NULL string pointer.
1 parent dc2d114 commit 80d76cf

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

cups/encode.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,7 @@ _cupsEncodeOption(
503503
if (depth >= _CUPS_MAX_OPTION_DEPTH)
504504
{
505505
// Don't allow "infinite" recursion of collection values...
506-
if (copy)
507-
free(copy);
508-
506+
free(copy);
509507
ippDeleteAttribute(ipp, attr);
510508
return (NULL);
511509
}
@@ -514,9 +512,7 @@ _cupsEncodeOption(
514512
if ((collection = ippNew()) == NULL)
515513
{
516514
cupsFreeOptions(num_cols, cols);
517-
518515
free(copy);
519-
520516
ippDeleteAttribute(ipp, attr);
521517
return (NULL);
522518
}

0 commit comments

Comments
 (0)