Skip to content

Commit

Permalink
CID 460738 fix
Browse files Browse the repository at this point in the history
Fixed minor Coverity complaint (allocation check after first use).
  • Loading branch information
MartinPulec committed May 14, 2024
1 parent 9ca00ff commit 06a71f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/audio/capture/jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ static void * audio_cap_jack_init(struct module *parent, const char *cfg)
strcpy(client_name, PACKAGE_NAME);

struct state_jack_capture *s = (struct state_jack_capture *) calloc(1, sizeof(struct state_jack_capture));
s->parent = parent;
if(!s) {
log_msg(LOG_LEVEL_ERROR, MOD_NAME "Unable to allocate memory.\n");
return NULL;
}
s->parent = parent;
s->libjack = open_libjack();
if (s->libjack == NULL) {
free(s);
Expand Down

0 comments on commit 06a71f0

Please sign in to comment.