Skip to content

Commit e3c5f3f

Browse files
committed
fix CID 472161
remaining 2 occurences
1 parent 69159df commit e3c5f3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/video_capture/ndi.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ static int vidcap_ndi_init(struct vidcap_params *params, void **state)
196196
// Not required, but "correct" (see the SDK documentation)
197197
if (!s->NDIlib->initialize()) {
198198
LOG(LOG_LEVEL_ERROR) << MOD_NAME << "Cannot initialize NDI!\n";
199-
delete s;
199+
vidcap_ndi_done(s);
200200
return VIDCAP_INIT_FAIL;
201201
}
202202
if ((vidcap_params_get_flags(params) & VIDCAP_FLAG_AUDIO_ANY) != 0u) {
@@ -235,7 +235,7 @@ static int vidcap_ndi_init(struct vidcap_params *params, void **state)
235235
ref_level = strtol(val, &endptr, 0);
236236
if (ref_level < 0 || ref_level >= INT_MAX || *val == '\0' || *endptr != '\0') {
237237
LOG(LOG_LEVEL_ERROR) << MOD_NAME << "Wrong value: " << val << "!\n";
238-
delete s;
238+
vidcap_ndi_done(s);
239239
return VIDCAP_INIT_NOERR;
240240
}
241241
}

0 commit comments

Comments
 (0)