added detach statements to prevent resource leak
This commit is contained in:
@@ -785,6 +785,11 @@ static int performCompression(adaptCCtx* ctx, FILE* const srcFile, outputThreadA
|
|||||||
signalErrorToThreads(ctx);
|
signalErrorToThreads(ctx);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
else if (pthread_detach(out)) {
|
||||||
|
DISPLAY("Error: could not detach output thread\n");
|
||||||
|
signalErrorToThreads(ctx);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create compression thread */
|
/* create compression thread */
|
||||||
@@ -795,6 +800,11 @@ static int performCompression(adaptCCtx* ctx, FILE* const srcFile, outputThreadA
|
|||||||
signalErrorToThreads(ctx);
|
signalErrorToThreads(ctx);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
else if (pthread_detach(compression)) {
|
||||||
|
DISPLAY("Error: could not detach compression thread\n");
|
||||||
|
signalErrorToThreads(ctx);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
unsigned currJob = 0;
|
unsigned currJob = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user