You don't need to check if dlna_src->uri is NULL if you use g_strcmp0. This check should just be:

    if (g_strcmp0(dlna_src->uri, uri) == 0)