diff options
-rw-r--r-- | oss/pcm_oss.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/oss/pcm_oss.c b/oss/pcm_oss.c index 9e38622..847721b 100644 --- a/oss/pcm_oss.c +++ b/oss/pcm_oss.c @@ -378,6 +378,11 @@ SND_PCM_PLUGIN_DEFINE_FUNC(oss) } oss = calloc(1, sizeof(*oss)); + if (! oss) { + SNDERR("cannot allocate"); + return -ENOMEM; + } + oss->device = strdup(device); if (oss->device == NULL) { SNDERR("cannot allocate"); |